RtError Class Reference

#include <RtAudio.hxx>

List of all members.


Detailed Description

Exception handling class for RtAudio.

The RtError class is quite simple but it does allow errors to be "caught" by RtError::TYPE. Almost all RtAudio methods can "throw" an RtError, most typically if an invalid stream identifier is supplied to a method or a driver error occurs. There are a number of cases within RtAudio where warning messages may be displayed but an exception is not thrown. There is a private RtAudio method, error(), which can be modified to globally control how these messages are handled and reported.

Definition at line 153 of file RtAudio.hxx.


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 char *p, TYPE tipe=RtError::UNSPECIFIED)
 The constructor.
virtual ~RtError (void)
 The destructor.
virtual void printMessage (void)
 Prints "thrown" error message to stdout.
virtual const TYPEgetType (void)
 Returns the "thrown" error message TYPE.
virtual const char * getMessage (void)
 Returns the "thrown" error message string.

Protected Attributes

char error_message [256]
TYPE type

Member Enumeration Documentation

Defined RtError types.

Enumerator:
WARNING 
DEBUG_WARNING 
UNSPECIFIED 
NO_DEVICES_FOUND 
INVALID_DEVICE 
INVALID_STREAM 
MEMORY_ERROR 
INVALID_PARAMETER 
DRIVER_ERROR 
SYSTEM_ERROR 
THREAD_ERROR 

Definition at line 157 of file RtAudio.hxx.


Constructor & Destructor Documentation

RtError::RtError ( const char *  p,
TYPE  tipe = RtError::UNSPECIFIED 
)

The constructor.

Definition at line 7093 of file RtAudio.cxx.

References error_message.

RtError::~RtError ( void   )  [virtual]

The destructor.

Definition at line 7099 of file RtAudio.cxx.


Member Function Documentation

void RtError::printMessage ( void   )  [virtual]

Prints "thrown" error message to stdout.

Definition at line 7103 of file RtAudio.cxx.

References error_message.

virtual const TYPE& RtError::getType ( void   )  [inline, virtual]

Returns the "thrown" error message TYPE.

Definition at line 186 of file RtAudio.hxx.

References type.

virtual const char* RtError::getMessage ( void   )  [inline, virtual]

Returns the "thrown" error message string.

Definition at line 189 of file RtAudio.hxx.

References error_message.

Referenced by CLAM::RtAAudioDeviceList::EnumerateAvailableDevices().


Member Data Documentation

char RtError::error_message[256] [protected]

Definition at line 172 of file RtAudio.hxx.

Referenced by getMessage(), printMessage(), and RtError().

TYPE RtError::type [protected]

Definition at line 173 of file RtAudio.hxx.

Referenced by getType().


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

Generated on Tue Aug 12 22:33:46 2008 for CLAM by  doxygen 1.5.5