The Synthesis ToolKit in C++ (STK)

Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

Public Types | Public Member Functions | List of all members
RtMidiError Class Reference

Exception handling class for RtMidi. More...

`#include <RtMidi.h>`

Inheritance diagram for RtMidiError:

## Public Types
enum | Type { WARNING , DEBUG_WARNING , UNSPECIFIED , NO_DEVICES_FOUND , INVALID_DEVICE , MEMORY_ERROR , INVALID_PARAMETER , INVALID_USE , DRIVER_ERROR , SYSTEM_ERROR , THREAD_ERROR }
| Defined RtMidiError types. More...

## Public Member Functions
| RtMidiError (const std::string &message, Type type=RtMidiError::UNSPECIFIED) throw ()
| The constructor.
virtual | ~RtMidiError (void) throw ()
| The destructor.
virtual void | printMessage (void) const throw ()
| Prints thrown error message to stderr.
virtual const Type & | getType (void) const throw ()
| Returns the thrown error message type.
virtual const std::string & | getMessage (void) const throw ()
| Returns the thrown error message string.
virtual const char * | what (void) const throw ()
| Returns the thrown error message as a c-style string.

## Detailed Description

Exception handling class for RtMidi.

The RtMidiError class is quite simple but it does allow errors to be "caught" by RtMidiError::Type. See the RtMidi documentation to know which methods can throw an RtMidiError.

## Member Enumeration Documentation

## ◆ Type

enum RtMidiError::Type

Defined RtMidiError types.

Enumerator
WARNING | A non-critical error.
DEBUG_WARNING | A non-critical error which might be useful for debugging.
UNSPECIFIED | The default, unspecified error type.
NO_DEVICES_FOUND | No devices found on system.
INVALID_DEVICE | An invalid device ID was specified.
MEMORY_ERROR | An error occurred during memory allocation.
INVALID_PARAMETER | An invalid parameter was specified to a function.
INVALID_USE | The function was called incorrectly.
DRIVER_ERROR | A system driver error occurred.
SYSTEM_ERROR | A system error occurred.
THREAD_ERROR | A thread error occurred.

100 {
101 WARNING,
102 DEBUG_WARNING,
103 UNSPECIFIED,
104 NO_DEVICES_FOUND,
105 INVALID_DEVICE,
106 MEMORY_ERROR,
107 INVALID_PARAMETER,
108 INVALID_USE,
109 DRIVER_ERROR,
110 SYSTEM_ERROR,
111 THREAD_ERROR
112 };
RtMidiError::INVALID_USE
@ INVALID_USE
Definition RtMidi.h:108
RtMidiError::NO_DEVICES_FOUND
@ NO_DEVICES_FOUND
Definition RtMidi.h:104
RtMidiError::MEMORY_ERROR
@ MEMORY_ERROR
Definition RtMidi.h:106
RtMidiError::INVALID_PARAMETER
@ INVALID_PARAMETER
Definition RtMidi.h:107
RtMidiError::WARNING
@ WARNING
Definition RtMidi.h:101
RtMidiError::INVALID_DEVICE
@ INVALID_DEVICE
Definition RtMidi.h:105
RtMidiError::THREAD_ERROR
@ THREAD_ERROR
Definition RtMidi.h:111
RtMidiError::DRIVER_ERROR
@ DRIVER_ERROR
Definition RtMidi.h:109
RtMidiError::UNSPECIFIED
@ UNSPECIFIED
Definition RtMidi.h:103
RtMidiError::DEBUG_WARNING
@ DEBUG_WARNING
Definition RtMidi.h:102
RtMidiError::SYSTEM_ERROR
@ SYSTEM_ERROR
Definition RtMidi.h:110

The documentation for this class was generated from the following file:

- RtMidi.h

The Synthesis ToolKit in C++ (STK)
©1995--2023 Perry R. Cook and Gary P. Scavone. All Rights Reserved.