22 #ifndef _Exception_hh_
23 #define _Exception_hh_
33 # pragma warning( disable : 4290 )
41 # define BEXCEPTION(arg)\
43 std::ostringstream os;\
44 os << __FILE__ << ":" << __LINE__ <<" : "<< arg;\
45 throw BIAS::FatalException(os.str().c_str());\
48 # define BEXCEPTION(arg)\
50 std::ostringstream os;\
52 throw BIAS::FatalException(os.str().c_str());\
57 # define BEXCEPTION_NONFATAL(arg)\
59 std::ostringstream os;\
60 os << __FILE__ << ":" << __LINE__ <<" : "<< arg;\
61 throw BIAS::NonFatalException(os.str().c_str());\
64 # define BEXCEPTION_NONFATAL(arg)\
66 std::ostringstream os;\
68 throw BIAS::NonFatalException(os.str().c_str());\
78 :
public std::exception
84 std::cerr <<
"exception raised: \""<<
Message_<<
"\"\n";
90 std::cerr <<
"exception raised: \""<<
Message_<<
"\"\n";
95 virtual const std::string&
What()
const throw()
100 virtual const char*
what()
const throw()
148 #endif // _Exception_hh_
FatalException(const char *error_message)
FatalException(const std::string &error_message)
BaseException(const char *error_message)
BaseException(const std::string &error_message)
NonFatalException(const std::string &error_message)
NonFatalException(const char *error_message)
virtual const char * what() const
Returns a C-style character string describing the general cause of the current error.
virtual const std::string & What() const