portaudio::PaException Class Reference
#include <Exception.hxx>
Inheritance diagram for portaudio::PaException:
[legend]Collaboration diagram for portaudio::PaException:
[legend]List of all members.
Detailed Description
Wrapper for PortAudio error codes to C++ exceptions.
It wraps up PortAudio's error handling mechanism using C++ exceptions and is derived from std::exception for easy exception handling and to ease integration with other code.
To know what exceptions each function may throw, look up the errors that can occure in the PortAudio documentation for the equivalent functions.
Some functions are likely to throw an exception (such as Stream::open(), etc) and these should always be called in try{} catch{} blocks and the thrown exceptions should be handled properly (ie. the application shouldn't just abort, but merely display a warning dialog to the user or something). However nearly all functions in PortAudioCpp are capable of throwing exceptions. When a function like Stream::isStopped() throws an exception, it's such an exceptional state that it's not likely that it can be recovered. PaExceptions such as these can ``safely'' be left to be handled by some outer catch-all-like mechanism for unrecoverable errors.
Constructor & Destructor Documentation
portaudio::PaException::PaException |
( |
PaError |
error |
) |
[explicit] |
|
|
Wraps a PortAudio error into a PortAudioCpp PaException. |
Member Function Documentation
const char * portaudio::PaException::what |
( |
|
) |
const throw () [virtual] |
|
PaError portaudio::PaException::paError |
( |
|
) |
const |
|
|
Returns the PortAudio error code (PaError). |
const char * portaudio::PaException::paErrorText |
( |
|
) |
const |
|
|
Returns the error as a (zero-terminated) text string. |
bool portaudio::PaException::isHostApiError |
( |
|
) |
const |
|
|
Returns true is the error is a HostApi error. |
long portaudio::PaException::lastHostApiError |
( |
|
) |
const |
|
const char * portaudio::PaException::lastHostApiErrorText |
( |
|
) |
const |
|
|
Returns the last HostApi error (which is the current one if isHostApiError() returns true) as a (zero-terminated) text string, if it's available. |
bool portaudio::PaException::operator== |
( |
const PaException & |
rhs |
) |
const |
|
bool portaudio::PaException::operator!= |
( |
const PaException & |
rhs |
) |
const |
|
Member Data Documentation
The documentation for this class was generated from the following files:
Generated on Fri Apr 2 20:22:48 2004 for PortAudioCpp by
1.3.6