File: Exception.h

package info (click to toggle)
moagg 0.18-6
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,924 kB
  • ctags: 4,059
  • sloc: cpp: 23,814; sh: 2,652; makefile: 283
file content (24 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef EXCEPTION_H
#define EXCEPTION_H

#include <iosfwd>
#include <string>

//----------------------------------------------------------------------------
class Exception
{
  public:
    Exception();
    Exception(const char *message);
    Exception(const std::string &message);
    virtual ~Exception();

    virtual std::string toString() const;

    friend std::ostream &operator<<(std::ostream &os, const Exception &e);

  protected:
    std::string m_message;
};

#endif //EXCEPTION_H