Go to the documentation of this file.
19 #ifndef DRUMSTICK_DRUMSTICKCOMMON_H
20 #define DRUMSTICK_DRUMSTICKCOMMON_H
25 #include <QCoreApplication>
29 #include <alsa/asoundlib.h>
62 m_location(s), m_errCode(rc) {}
75 return QString(snd_strerror(m_errCode));
112 qDebug() <<
"Error code:" << rc <<
"(" << snd_strerror(rc) <<
")";
113 qDebug() <<
"Location:" << where;
129 qWarning() <<
"Exception code:" << rc <<
"(" << snd_strerror(rc) <<
")";
130 qWarning() <<
"Location:" << where;
139 #define CHECK_ERROR(x) (checkErrorAndThrow((x),__PRETTY_FUNCTION__))
145 #define CHECK_WARNING(x) (checkWarning((x),__PRETTY_FUNCTION__))
int checkWarning(int rc, const char *where)
Check the error code for warning errors.
int checkErrorAndThrow(int rc, const char *where)
Checks the error code for severe errors.
Drumstick visibility macros.
const QString & location() const
Gets the location of the error code as provided in the constructor.
Class used to report errors from the ALSA sequencer.
virtual ~SequencerError()
Destructor.
const QString LIBRARY_VERSION(SND_LIB_VERSION_STR)
ALSA library version as a constant string.
const QString qstrError() const
Gets the human readable error message from the error code.
SequencerError(QString const &s, int rc)
Constructor.
int code() const
Gets the numeric error code.
quint8 MidiByte
8-bit unsigned number to be used as a MIDI message parameter