|
Canorus 0.0
|
Exception handling class for RtAudio & RtMidi. More...
#include <RtError.h>
Public Types | |
| enum | Type { WARNING , DEBUG_WARNING , UNSPECIFIED , NO_DEVICES_FOUND , INVALID_DEVICE , INVALID_STREAM , MEMORY_ERROR , INVALID_PARAMETER , DRIVER_ERROR , SYSTEM_ERROR , THREAD_ERROR } |
| Defined RtError types. More... | |
Public Member Functions | |
| RtError (const std::string &message, Type type=RtError::UNSPECIFIED) | |
| The constructor. More... | |
| virtual | ~RtError (void) |
| The destructor. More... | |
| virtual void | printMessage (void) |
| Prints thrown error message to stderr. More... | |
| virtual const Type & | getType (void) |
| Returns the thrown error message type. More... | |
| virtual const std::string & | getMessage (void) |
| Returns the thrown error message string. More... | |
| virtual const char * | getMessageString (void) |
| Returns the thrown error message as a C string. More... | |
Protected Attributes | |
| std::string | message_ |
| Type | type_ |
Exception handling class for RtAudio & RtMidi.
The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. See the RtAudio and RtMidi documentation to know which methods can throw an RtError.
| enum RtError::Type |
Defined RtError types.
|
inline |
The constructor.
|
inlinevirtual |
The destructor.
|
inlinevirtual |
Returns the thrown error message string.
References message_.
|
inlinevirtual |
Returns the thrown error message as a C string.
References message_.
Returns the thrown error message type.
References type_.
|
inlinevirtual |
Prints thrown error message to stderr.
References message_.
Referenced by CARtMidiDevice::CARtMidiDevice(), CARtMidiDevice::closeInputPort(), CARtMidiDevice::closeOutputPort(), CARtMidiDevice::getInputPorts(), CARtMidiDevice::getOutputPorts(), CARtMidiDevice::openInputPort(), and CARtMidiDevice::openOutputPort().

|
protected |
Referenced by getMessage(), getMessageString(), and printMessage().