1#ifndef FRAMEWORK_EXCEPTION_H
2#define FRAMEWORK_EXCEPTION_H
56 const std::string &
name()
const throw() {
return name_; }
86 virtual const char *
what()
const throw() {
return message_.c_str(); }
94 void buildStackTrace() throw();
126#define EXCEPTION_RAISE(EXCEPTION, MSG) \
127 throw framework::exception::Exception(EXCEPTION, MSG, __FILE__, __LINE__, \
Standard base exception class with some useful output information.
Exception(const std::string &name, const std::string &message, const std::string &module, int line, const std::string &function)
Class constructor.
Exception()
Empty constructor.
const std::string & function() const
Get the function name where the exception occurred.
int line() const
Get the source line number where the exception occurred.
virtual const char * what() const
The error message.
const std::string & message() const
Get the message of the exception.
virtual ~Exception()
Class destructor.
std::string function_
Function name where the exception occurred.
std::string stackTrace_
The stack trace.
int line_
Source line number where the exception occurred.
const std::string & name() const
Get the name of the exception.
std::string module_
Source filename where the exception occurred.
const std::string & stackTrace() const
Get the full stack trace.
std::string message_
Error message.
const std::string & module() const
Get the source filename where the exception occurred.
std::string name_
Exception name.
All classes in the ldmx-sw project use this namespace.