summaryrefslogtreecommitdiff
path: root/tools/bad_thing.h
blob: 578170e9c00ca5a224dff44715fe910c8e1b838b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef BAD_THING_H
#define BAD_THING_H
class payloader{
public:
  int refcount;
  char str[0];
};

class bad_thing: public std::exception{
  std::string msg;

public:
  virtual const char* what() const throw() {
    return msg.c_str();
  }

// constructor
  bad_thing(const std::string _msg)
  : msg(_msg)
  {}

// destructor
  ~bad_thing() throw() {
  }
};
#endif