|
Canorus
0.7
|
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. | |
| virtual | ~RtError (void) |
| The destructor. | |
| virtual void | printMessage (void) |
| Prints thrown error message to stderr. | |
| virtual const Type & | getType (void) |
| Returns the thrown error message type. | |
| virtual const std::string & | getMessage (void) |
| Returns the thrown error message string. | |
| virtual const char * | getMessageString (void) |
| Returns the thrown error message as a C string. | |
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.
| RtError::RtError | ( | const std::string & | message, |
| Type | type = RtError::UNSPECIFIED |
||
| ) | [inline] |
The constructor.
| virtual RtError::~RtError | ( | void | ) | [inline, virtual] |
The destructor.
| virtual const std::string& RtError::getMessage | ( | void | ) | [inline, virtual] |
Returns the thrown error message string.
References message_.
| virtual const char* RtError::getMessageString | ( | void | ) | [inline, virtual] |
Returns the thrown error message as a C string.
References message_.
| virtual const Type& RtError::getType | ( | void | ) | [inline, virtual] |
Returns the thrown error message type.
References type_.
| virtual void RtError::printMessage | ( | void | ) | [inline, virtual] |
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().

std::string RtError::message_ [protected] |
Referenced by getMessage(), getMessageString(), and printMessage().
Type RtError::type_ [protected] |
Referenced by getType().
1.8.0