C++ main module for emicrom 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 public:
18 
19 
20 private:
21  // ATTRIBUTES
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 tUInteger& line,
59  const tString& function);
60 
61 
62 
63  // DESTRUCTORS
64 
65  // METHOD
66 
67 
70  inline tString getMessage() const {
71  tString ret(what());
72  return ret;
73  }
76  virtual tString toString() const {
77  return getMessage();
78  }
79 
85  friend ostream& operator << (ostream& out,const CORE_Exception& obj) {
86  out << obj.toString();
87  return out;
88  };
89 
90 };
91 #endif
#define tUInteger
Definition: types.h:91
virtual tString toString() const
return the message of the exception
Definition: CORE_Exception.h:76
CORE_Exception()
build an exception
Definition: CORE_Exception.cpp:7
friend ostream & operator<<(ostream &out, const CORE_Exception &obj)
print the class object
Definition: CORE_Exception.h:85
this class describes the exceptions raised for CORE package
Definition: CORE_Exception.h:15
#define tString
Definition: types.h:135
tString getMessage() const
return the message of the exception
Definition: CORE_Exception.h:70