![]() |
drumstick 2.10.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) |
This macro calls the check error function. | |
#define | DRUMSTICK_ALSA_CHECK_WARNING(x) |
This macro calls the check warning function. | |
Functions | |
int | checkErrorAndThrow (int rc, const char *where) |
Checks the error code for severe errors. | |
int | checkWarning (int rc, const char *where) |
Check the error code for warning errors. | |
SequencerError (QString const &s, int rc) | |
Constructor. | |
virtual const char * | what () const noexcept override |
Retrieve a human readable error message. | |
QString | qstrError () const |
Gets the human readable error message from the error code. | |
int | code () const |
Gets the numeric error code. | |
const QString & | location () const |
Gets the location of the error code as provided in the constructor. | |
Exception class for ALSA Sequencer errors.
#define DRUMSTICK_ALSA_CHECK_ERROR | ( | x | ) |
This macro calls the check error function.
x | Error code |
Definition at line 80 of file errorcheck.h.
Referenced by MidiCodec::MidiCodec(), MidiQueue::MidiQueue(), MidiQueue::MidiQueue(), MidiQueue::MidiQueue(), MidiClient::open(), MidiClient::open(), MidiClient::portAttach(), MidiClient::portDetach(), Timer::Timer(), Timer::Timer(), Timer::Timer(), and Timer::Timer().
#define DRUMSTICK_ALSA_CHECK_WARNING | ( | x | ) |
This macro calls the check warning function.
x | Error code |
Definition at line 86 of file errorcheck.h.
Referenced by MidiClient::_setClientName(), Timer::addAsyncTimerHandler(), MidiPort::applyPortInfo(), MidiClient::close(), MidiClient::connectFrom(), MidiClient::connectTo(), MidiQueue::continueRunning(), Timer::continueRunning(), MidiClient::createSimplePort(), MidiCodec::decode(), MidiClient::deleteSimplePort(), MidiClient::detachAllPorts(), MidiClient::disconnectFrom(), MidiClient::disconnectTo(), MidiClient::drainOutput(), MidiClient::dropInput(), MidiClient::dropInputBuffer(), MidiClient::dropOutput(), MidiClient::dropOutputBuffer(), MidiCodec::encode(), MidiCodec::encode(), MidiClient::extractOutput(), MidiClient::getClientId(), MidiQueue::getInfo(), MidiQueue::getStatus(), MidiQueue::getTempo(), MidiQueue::getTimer(), Timer::getTimerStatus(), MidiQueue::getUsage(), MidiClient::open(), MidiClient::open(), MidiClient::output(), MidiClient::outputBuffer(), MidiClient::outputDirect(), Timer::pollDescriptors(), MidiClient::pollDescriptorsRevents(), Timer::pollDescriptorsRevents(), PortInfo::PortInfo(), PortInfo::PortInfo(), MidiClient::removeEvents(), MidiClient::resetPoolInput(), MidiClient::resetPoolOutput(), MidiCodec::resizeBuffer(), MidiClient::setBlockMode(), MidiQueue::setInfo(), MidiClient::setInputBufferSize(), MidiClient::setOutputBufferSize(), MidiClient::setPoolInfo(), MidiClient::setPoolInput(), MidiClient::setPoolOutput(), MidiClient::setPoolOutputRoom(), MidiQueue::setTempo(), MidiQueue::setTimer(), Timer::setTimerParams(), MidiQueue::setUsage(), MidiQueue::start(), Timer::start(), MidiQueue::stop(), Timer::stop(), Subscription::subscribe(), Subscription::Subscription(), TimerQuery::TimerQuery(), TimerQuery::TimerQuery(), Subscription::unsubscribe(), MidiQueue::~MidiQueue(), and Timer::~Timer().
|
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 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 qstrError().