#include <exception.h>
Inheritance diagram for EMAN::E2Exception:
Public Member Functions | |
E2Exception (const string &file="", int line=0, const string &desc_str="", const string &objname_str="") | |
Contructor. | |
virtual | ~E2Exception () throw () |
virtual const char * | what () const throw () |
The E2Exception information. | |
virtual const char * | name () const |
The name of this E2Exception class. | |
Protected Attributes | |
string | filename |
int | linenum |
string | desc |
string | objname |
Definition at line 75 of file exception.h.
|
Contructor.
Definition at line 85 of file exception.h. 00087 : filename(file), linenum(line), desc(desc_str), objname(objname_str) 00088 { 00089 // Log the message 00090 stringstream ss; 00091 string line_str; 00092 ss << line; 00093 ss >> line_str; 00094 // We shouldn't log all exceptions, since they are frequently used intentionally, with no implied error 00095 // string message = "File " + file + " line " + line_str + " description " + desc_str + " " + objname_str; 00096 // LOGERR( message.c_str() ); 00097 }
|
|
Definition at line 99 of file exception.h. 00099 {}
|
|
The name of this E2Exception class.
Reimplemented in EMAN::_NotExistingObjectException, EMAN::_ImageFormatException, EMAN::_ImageDimensionException, EMAN::_FileAccessException, EMAN::_ImageReadException, EMAN::_ImageWriteException, EMAN::_NullPointerException, EMAN::_TypeException, EMAN::_InvalidValueException, EMAN::_InvalidStringException, EMAN::_OutofRangeException, EMAN::_InvalidCallException, EMAN::_InvalidParameterException, EMAN::_EmptyContainerException, EMAN::_BadAllocException, and EMAN::_UnexpectedBehaviorException. Definition at line 111 of file exception.h. Referenced by what(). 00111 { return "Exception"; }
|
|
The E2Exception information.
Definition at line 40 of file exception.cpp. References desc, filename, EMAN::Util::int2str(), linenum, name(), and objname. 00041 { 00042 string err1 = ""; 00043 if (objname != "") { 00044 err1 = "error with '" + objname + "': "; 00045 } 00046 00047 string msg = string(name()) + " at " + filename + ":" + Util::int2str(linenum); 00048 msg += ": " + err1 + "'" + desc + "' caught\n"; 00049 return msg.c_str(); 00050 }
|
|
Definition at line 115 of file exception.h. Referenced by what(). |
|
Definition at line 113 of file exception.h. Referenced by what(). |
|
Definition at line 114 of file exception.h. Referenced by what(). |
|
Definition at line 116 of file exception.h. Referenced by what(). |