drumstick 2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.
|
Exception class for ALSA Sequencer errors. More...
Classes | |
class | SequencerError |
Exception class for ALSA Sequencer errors. More... | |
Macros | |
#define | DRUMSTICK_ALSA_CHECK_ERROR(x) (checkErrorAndThrow((x),__PRETTY_FUNCTION__)) |
This macro calls the check error function. More... | |
#define | DRUMSTICK_ALSA_CHECK_WARNING(x) (checkWarning((x),__PRETTY_FUNCTION__)) |
This macro calls the check warning function. More... | |
Functions | |
int | checkErrorAndThrow (int rc, const char *where) |
Checks the error code for severe errors. More... | |
int | checkWarning (int rc, const char *where) |
Check the error code for warning errors. More... | |
SequencerError (QString const &s, int rc) | |
Constructor. More... | |
virtual const char * | what () const noexcept override |
Retrieve a human readable error message. More... | |
QString | qstrError () const |
Gets the human readable error message from the error code. More... | |
int | code () const |
Gets the numeric error code. More... | |
const QString & | location () const |
Gets the location of the error code as provided in the constructor. More... | |
Exception class for ALSA Sequencer errors.
#define DRUMSTICK_ALSA_CHECK_ERROR | ( | x | ) | (checkErrorAndThrow((x),__PRETTY_FUNCTION__)) |
This macro calls the check error function.
x | Error code |
Definition at line 80 of file errorcheck.h.
#define DRUMSTICK_ALSA_CHECK_WARNING | ( | x | ) | (checkWarning((x),__PRETTY_FUNCTION__)) |
This macro calls the check warning function.
x | Error code |
Definition at line 86 of file errorcheck.h.
|
inline |
Checks the error code for severe errors.
If the provided error code is less than zero an exception is thrown, containing both the error code and the location.
rc | Error code |
where | Location |
Definition at line 50 of file errorcheck.h.
|
inline |
Check the error code for warning errors.
This method doesn't throw an exception.
rc | Error code |
where | Location |
Definition at line 67 of file errorcheck.h.
int code | ( | ) | const |
Gets the numeric error code.
Definition at line 49 of file sequencererror.cpp.
const QString & location | ( | ) | const |
Gets the location of the error code as provided in the constructor.
Definition at line 54 of file sequencererror.cpp.
QString qstrError | ( | ) | const |
Gets the human readable error message from the error code.
Definition at line 44 of file sequencererror.cpp.
References SequencerError::what().
SequencerError | ( | QString const & | s, |
int | rc | ||
) |
Constructor.
s | Error location |
rc | Numeric error code |
Definition at line 36 of file sequencererror.cpp.
|
overridevirtualnoexcept |
Retrieve a human readable error message.
Definition at line 39 of file sequencererror.cpp.
Referenced by SequencerError::qstrError().