MCPcopy Create free account
hub / github.com/VCVRack/Rack / Exception

Class Exception

include/common.hpp:213–223  ·  view source on GitHub ↗

An exception explicitly thrown by Rack or a Rack plugin. Can be subclassed to throw/catch specific custom exceptions. */

Source from the content-addressed store, hash-verified

211Can be subclassed to throw/catch specific custom exceptions.
212*/
213struct Exception : std::exception {
214 std::string msg;
215
216 // Attribute index 1 refers to `Exception*` argument so use 2.
217 __attribute__((format(printf, 2, 3)))
218 Exception(const char* format, ...);
219 Exception(const std::string& msg) : msg(msg) {}
220 const char* what() const noexcept override {
221 return msg.c_str();
222 }
223};
224
225
226/** Given a std::map `c`, returns the value of the given key, or returns `def` if the key doesn't exist.

Callers 15

loadFunction · 0.85
loadLibraryFunction · 0.85
loadPluginCallbackFunction · 0.85
loadPluginFunction · 0.85
modelFromJsonFunction · 0.85
loadAutosaveMethod · 0.85
RtAudioDeviceMethod · 0.85
openStreamMethod · 0.85
subscribeMethod · 0.85
splitFunction · 0.85
RtMidiInputDeviceMethod · 0.85
RtMidiOutputDeviceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected