source: issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h@ 13623

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
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>
14using namespace std;
15
16/*We derive our classes from the c++ exception class: */
17class ErrorException: public exception {
18
19 string what_str;
20 string function_name;
21 string file_name;
22 int file_line;
23
24 public:
25 ErrorException(const string &what_arg); //for windows
26 ErrorException(const string& what_file,const string& what_function,int what_line,const string& what_arg);//UNIX
27 ~ErrorException() throw();
28 virtual const char *what() const throw();
29 void Report() const;
30
31};
32
33char* exprintf(const char* format,...);
34#endif
Note: See TracBrowser for help on using the repository browser.