Last change
on this file since 13623 was 13623, checked in by Mathieu Morlighem, 12 years ago |
CHG: cosmetics, removing all deboule blank lines and indent single white lines correctly
|
File size:
948 bytes
|
Rev | Line | |
---|
[1] | 1 | /*!\file exceptions.h
|
---|
| 2 | * \brief: two types of exceptions are handled for now. Errors, and
|
---|
| 3 | * warnings. Those exceptions are trapped provided the matlab modules
|
---|
| 4 | * are started using MODULEBOOT, and ended using MODULEEND. These are
|
---|
| 5 | * macros hiding try, catch statements. This header file defines our
|
---|
| 6 | * own exceptions
|
---|
| 7 | */
|
---|
| 8 |
|
---|
| 9 | #ifndef MY_EXCEPTIONS_H_
|
---|
| 10 | #define MY_EXCEPTIONS_H_
|
---|
| 11 |
|
---|
| 12 | #include <exception>
|
---|
| 13 | #include <string>
|
---|
| 14 | using namespace std;
|
---|
| 15 |
|
---|
| 16 | /*We derive our classes from the c++ exception class: */
|
---|
| 17 | class ErrorException: public exception {
|
---|
[13623] | 18 |
|
---|
[3329] | 19 | string what_str;
|
---|
| 20 | string function_name;
|
---|
| 21 | string file_name;
|
---|
| 22 | int file_line;
|
---|
[1] | 23 |
|
---|
[12079] | 24 | public:
|
---|
[3329] | 25 | ErrorException(const string &what_arg); //for windows
|
---|
[12479] | 26 | ErrorException(const string& what_file,const string& what_function,int what_line,const string& what_arg);//UNIX
|
---|
[1] | 27 | ~ErrorException() throw();
|
---|
| 28 | virtual const char *what() const throw();
|
---|
[13363] | 29 | void Report() const;
|
---|
[1] | 30 |
|
---|
| 31 | };
|
---|
| 32 |
|
---|
[11199] | 33 | char* exprintf(const char* format,...);
|
---|
[1] | 34 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.