80 inline std::ostream&
operator<<(std::ostream& anOutputStream,
84 anOutputStream << anException.
what();
86 return (anOutputStream);
92 const char* aFunctionName,
94 const char* anErrorMessage):
99 std::stringstream error_message;
103 error_message <<
"Error: " << anErrorMessage << std::endl;
107 error_message <<
"Error: " << std::endl;
109 error_message <<
"\t- in File: " << aFileName << std::endl;
110 error_message <<
"\t- in Function: " << aFunctionName << std::endl;
111 error_message <<
"\t- at Line: " << anErrorLine << std::endl;
119 const char* aFunctionName,
121 const std::string& anErrorMessage):
126 std::stringstream error_message;
127 error_message <<
"Error: " << anErrorMessage << std::endl;
128 error_message <<
"\t- in File: " << aFileName << std::endl;
129 error_message <<
"\t- in Function: " << aFunctionName << std::endl;
130 error_message <<
"\t- at Line: " << anErrorLine << std::endl;
std::string m_error_message
The error message.
Exception(const char *aFileName=0, const char *aFunctionName=0, int anErrorLine=0, const char *anErrorMessage=0)
Default constructor.
Exception is a class to handle exceptions.
std::ostream & operator<<(std::ostream &anOutputSream, const gVirtualXRay::AtomicElement &anElement)
operator <<
virtual const char * what() const
Accessor on the error message.
virtual ~Exception()
Destructor.