Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


RtError Class Reference

Exception handling class for RtAudio & RtMidi. More...

#include <RtError.h>

Inherits std::exception.

List of all members.

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 RtError types.

More...

Public Member Functions

 RtError (const std::string &message, Type type=RtError::UNSPECIFIED) throw ()
 The constructor.
virtual ~RtError (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 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.


Member Enumeration Documentation

Defined RtError 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.

00023             {
00024     WARNING,           
00025     DEBUG_WARNING,     
00026     UNSPECIFIED,       
00027     NO_DEVICES_FOUND,  
00028     INVALID_DEVICE,    
00029     MEMORY_ERROR,      
00030     INVALID_PARAMETER, 
00031     INVALID_USE,       
00032     DRIVER_ERROR,      
00033     SYSTEM_ERROR,      
00034     THREAD_ERROR       
00035   };


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

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