Home Class/Enum List File List Compound Members C interface

Public Types | Public Member Functions | List of all members
RtAudioError Class Reference

Exception handling class for RtAudio. More...

`#include <RtAudio.h>`

Inherits std::runtime_error.

## 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 RtAudioError types. More...

## Public Member Functions

| RtAudioError (const std::string &message, Type type=RtAudioError::UNSPECIFIED)
| The constructor.
virtual void | printMessage (void) const
| Prints thrown error message to stderr.
virtual const Type & | getType (void) const
| Returns the thrown error message type.
virtual const std::string | getMessage (void) const
| Returns the thrown error message string.

## Detailed Description

Exception handling class for RtAudio.

The RtAudioError class is quite simple but it does allow errors to be "caught" by RtAudioError::Type. See the RtAudio documentation to know which methods can throw an RtAudioError.

## Member Enumeration Documentation

## ◆ Type

enum RtAudioError::Type

Defined RtAudioError 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 occurred 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 occurred.
SYSTEM_ERROR | A system error occurred.
THREAD_ERROR | A thread error occurred.

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

- RtAudio.h

| ©2001-2021 Gary P. Scavone, McGill University. All Rights Reserved. Maintained by Gary P. Scavone.