Last change
on this file since 60 was
43,
checked in by rosiere, 17 years ago
|
Modif mineur : ajout d'info de débug
Release non stable
|
File size:
1.3 KB
|
Line | |
---|
1 | #ifndef morpheo_ErrorMorpheo |
---|
2 | #define morpheo_ErrorMorpheo |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id$ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include <iostream> |
---|
12 | #include <exception> |
---|
13 | |
---|
14 | using namespace std; |
---|
15 | |
---|
16 | namespace morpheo { |
---|
17 | |
---|
18 | class ErrorMorpheo : public exception |
---|
19 | { |
---|
20 | // -----[ fields ]---------------------------------------------------- |
---|
21 | private : string _msg; |
---|
22 | |
---|
23 | // -----[ methods ]--------------------------------------------------- |
---|
24 | public : ErrorMorpheo () throw() { _msg = "Exception detected ...";} |
---|
25 | public : ErrorMorpheo (string msg) throw() { _msg = msg;} |
---|
26 | public : ~ErrorMorpheo (void) throw() {} |
---|
27 | public : const char* what () const throw() { return ( _msg.c_str() );} |
---|
28 | |
---|
29 | }; |
---|
30 | |
---|
31 | class TestMorpheo : public exception |
---|
32 | { |
---|
33 | // -----[ fields ]---------------------------------------------------- |
---|
34 | private : string _msg; |
---|
35 | |
---|
36 | // -----[ methods ]--------------------------------------------------- |
---|
37 | public : TestMorpheo () throw() { _msg = "Test error ...";} |
---|
38 | public : TestMorpheo (string msg) throw() { _msg = msg;} |
---|
39 | public : ~TestMorpheo (void) throw() {} |
---|
40 | public : const char* what () const throw() { return ( _msg.c_str() );} |
---|
41 | }; |
---|
42 | |
---|
43 | }; // end namespace morpheo |
---|
44 | |
---|
45 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.