drumstick 2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.
sequencererror.h
Go to the documentation of this file.
1/*
2 MIDI Sequencer C++ library
3 Copyright (C) 2006-2023, Pedro Lopez-Cabanillas <plcl@users.sf.net>
4
5 This library is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef SEQUENCERERROR_H
20#define SEQUENCERERROR_H
21
22#include <QString>
23#include "macros.h"
24#include <exception>
25
40#if defined(DRUMSTICK_STATIC)
41#define DRUMSTICK_ALSA_EXPORT
42#else
43#if defined(drumstick_alsa_EXPORTS)
44#define DRUMSTICK_ALSA_EXPORT Q_DECL_EXPORT
45#else
46#define DRUMSTICK_ALSA_EXPORT Q_DECL_IMPORT
47#endif
48#endif
49
50namespace drumstick {
51namespace ALSA {
52
64class DRUMSTICK_ALSA_EXPORT SequencerError : std::exception
65{
66public:
72 SequencerError(QString const& s, int rc);
73
78 virtual const char* what() const noexcept override;
79
84 QString qstrError() const;
85
90 int code() const;
91
96 const QString& location() const;
97
98private:
99 QString m_location;
100 int m_errCode;
101};
102
105} // namespace ALSA
106} // namespace drumstick
107
108#endif // SEQUENCERERROR_H
Exception class for ALSA Sequencer errors.
Provides consistent interface to handle errors.
Drumstick common.
Definition: alsaclient.cpp:68