Quark  0.1
Exception.h++
Go to the documentation of this file.
1 #ifndef __libquark_util_Exception_hxx
2 #define __libquark_util_Exception_hxx
3 
4 #include <exception>
5 #include <iosfwd>
6 
7 #include <QByteArray>
8 #include <QString>
9 
10 namespace quark {
11 namespace util {
12 
13 class Exception : public std::exception
14 {
15  public:
16 
17  virtual ~Exception() throw();
18 
19  inline QString getMessage() const
20  { return(_message); }
21 
22  virtual const char *what() const throw()
23  { return(_messageAscii.data()); }
24 
25  protected:
26 
27  Exception(const QString &message = QString());
28 
29  private:
30 
31  QString _message;
32  QByteArray _messageAscii;
33 };
34 
35 } // namespace util
36 } // namespace quark
37 
38 #endif // __libquark_util_Exception_hxx
QString getMessage() const
Definition: Exception.h++:19
Definition: BarChartView.h++:6
Exception(const QString &message=QString())
virtual const char * what() const
Definition: Exception.h++:22
Definition: Exception.h++:13