Tutorial   Class/Enum List   File List   Compound Members  

RtError Class Reference

Exception handling class for RtAudio. More...

#include <RtAudio.h>

List of all members.

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.


Public Methods

 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.


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.


The documentation for this class was generated from the following file:
©2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.
Maintained by Gary P. Scavone, gary@ccrma.stanford.edu