Revision 5:7fde3cc109dc MIDIEvent.h
| MIDIEvent.h | ||
|---|---|---|
| 33 | 33 |
#ifndef _MIDI_EVENT_H_ |
| 34 | 34 |
#define _MIDI_EVENT_H_ |
| 35 | 35 |
|
| 36 |
#include <QString> |
|
| 37 | 36 |
#include <string> |
| 38 | 37 |
#include <iostream> |
| 39 | 38 |
|
| ... | ... | |
| 227 | 226 |
class MIDIException : virtual public std::exception |
| 228 | 227 |
{
|
| 229 | 228 |
public: |
| 230 |
MIDIException(QString message) throw() : m_message(message) {
|
|
| 231 |
std::cerr << "WARNING: MIDI exception: " |
|
| 232 |
<< message.toLocal8Bit().data() << std::endl; |
|
| 229 |
MIDIException(std::string message) throw() : m_message(message) {
|
|
| 230 |
std::cerr << "WARNING: MIDI exception: " << message.c_str() << std::endl; |
|
| 233 | 231 |
} |
| 234 | 232 |
virtual ~MIDIException() throw() { }
|
| 235 | 233 |
|
| 236 | 234 |
virtual const char *what() const throw() {
|
| 237 |
return m_message.toLocal8Bit().data();
|
|
| 235 |
return m_message.c_str();
|
|
| 238 | 236 |
} |
| 239 | 237 |
|
| 240 | 238 |
protected: |
| 241 |
QString m_message;
|
|
| 239 |
std::string m_message;
|
|
| 242 | 240 |
}; |
| 243 | 241 |
|
| 244 | 242 |
#endif |
Also available in: Unified diff