C++ main module for gpm Package  1.0
CORE_Exception.h
Go to the documentation of this file.
1 #ifndef CORE_Exception_H
2 #define CORE_Exception_H
3 
4 #include "CORE_Object.h"
5 
6 #include <stdexcept>
7 
8 
15 class CORE_Exception: public std::runtime_error {
16 
17 
18 
19 private:
20  // ATTRIBUTES
21  static tBoolean mIsPrinted;
22 
23  // ASSOCIATIONS
24 
25  // METHODS
26 
27 
28 public:
29  // CONSTRUCTORS
33  CORE_Exception(const tString& package);
34 
45  CORE_Exception(const tString& package,
46  const tString& where,
47  const tString& what);
48 
55  CORE_Exception(const tString& package,
56  const tString& assertion,
57  const tString& file,
58  const unsigned int& line,
59  const tString& function);
60 
61 
62 
63  // DESTRUCTORS
64 
65  // METHOD
66 
74  inline static void enablePrint(const tBoolean& enable) {
75  mIsPrinted=enable;
76  };
77 
80  inline tString getMessage() const {
81  tString ret(what());
82  return ret;
83  }
84 
85 };
86 #endif
#define tBoolean
Definition: types.h:35
CORE_Exception()
build an exception
Definition: CORE_Exception.cpp:5
this class describes the exceptions raised for CORE package
Definition: CORE_Exception.h:15
#define tString
Definition: types.h:36
tString getMessage() const
return the message of the exception
Definition: CORE_Exception.h:80
static void enablePrint(const tBoolean &enable)
Definition: CORE_Exception.h:74