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

Last change on this file since 11199 was 11199, checked in by Mathieu Morlighem, 13 years ago

Fixed some deprecated conversion from chat* to const char*

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