delphi_cb
 All Classes Namespaces Files Functions Variables Macros
exceptions.h
Go to the documentation of this file.
1 
7 #ifndef CEXCEPTIONS_H_
8 #define CEXCEPTIONS_H_
9 
10 #include <iostream>
11 
12 using namespace std;
13 
21 {
22  public:
23  CException()
24  {
25  cerr << "\033[1;31m" << "[EXCEPTION]";
26  }
27 
28  ~CException()
29  {
30  cerr << "\033[0m";
31  }
32 };
33 
41 class CWarning // Program continues its run with warnings
42 {
43  private:
44 
45  public:
46  static int iWarningNum;
47 
48  CWarning()
49  {
50  iWarningNum++;
51 
52  cerr << " " << "\033[1;34m" << "[WARNING #" << iWarningNum << "] ";
53  }
54 
55  ~CWarning()
56  {
57  cerr << "\033[0m";
58  }
59 };
60 
61 #endif // CEXCEPTIONS_H_
Definition: exceptions.h:41
Definition: exceptions.h:20