LMMS
Loading...
Searching...
No Matches
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.

Protected Attributes

std::string message_
Type type_

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

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 occured 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 occured.

SYSTEM_ERROR 

A system error occured.

THREAD_ERROR 

A thread error occured.

Constructor & Destructor Documentation

◆ RtMidiError()

RtMidiError::RtMidiError ( const std::string & message,
Type type = RtMidiError::UNSPECIFIED )
throw ( )
inline

The constructor.

◆ ~RtMidiError()

virtual RtMidiError::~RtMidiError ( void )
throw ( )
inlinevirtual

The destructor.

Member Function Documentation

◆ getMessage()

virtual const std::string & RtMidiError::getMessage ( void ) const
throw ( )
inlinevirtual

Returns the thrown error message string.

◆ getType()

virtual const Type & RtMidiError::getType ( void ) const
throw ( )
inlinevirtual

Returns the thrown error message type.

◆ printMessage()

virtual void RtMidiError::printMessage ( void ) const
throw ( )
inlinevirtual

Prints thrown error message to stderr.

◆ what()

virtual const char * RtMidiError::what ( void ) const
throw ( )
inlinevirtual

Returns the thrown error message as a c-style string.

Member Data Documentation

◆ message_

std::string RtMidiError::message_
protected

◆ type_

Type RtMidiError::type_
protected

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