|
Last change
on this file since 10937 was 3332, checked in by Mathieu Morlighem, 16 years ago |
|
Do not use throw ErrorException -> ISSMERROR macro
Removed all FUNCT definitions (now useless)
|
|
File size:
918 bytes
|
| Line | |
|---|
| 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 {
|
|---|
| 18 |
|
|---|
| 19 | string what_str;
|
|---|
| 20 | string function_name;
|
|---|
| 21 | string file_name;
|
|---|
| 22 | int file_line;
|
|---|
| 23 |
|
|---|
| 24 | public:
|
|---|
| 25 |
|
|---|
| 26 | ErrorException(const string &what_arg); //for windows
|
|---|
| 27 | ErrorException(string what_file,string what_function,int what_line,string what_arg);//UNIX
|
|---|
| 28 | ~ErrorException() throw();
|
|---|
| 29 |
|
|---|
| 30 | virtual const char *what() const throw();
|
|---|
| 31 |
|
|---|
| 32 | void Report();
|
|---|
| 33 |
|
|---|
| 34 | };
|
|---|
| 35 |
|
|---|
| 36 | char* exprintf(char* format,...);
|
|---|
| 37 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.