92 if (globalExceptionHandler_ ==
nullptr)
96 return *globalExceptionHandler_;
105 static void setName(
const std::string & name)
110 static void setMessage(
const std::string & message)
115 static void setLine(
int line)
120 static void setFile(
const std::string & file)
125 static void setFunction(
const std::string &
function)
130 static void set(
const std::string & file,
int line,
const std::string &
function,
131 const std::string & name,
const std::string & message)
137 static void terminate()
141 static
void newHandler();
153 static
std::
string & file_()
155 static std::string * file_ =
nullptr;
156 if (file_ ==
nullptr)
158 file_ =
new std::string;
167 static int * line_ =
nullptr;
168 if (line_ ==
nullptr)
179 static std::string * function_ =
nullptr;
180 if (function_ ==
nullptr)
182 function_ =
new std::string;
183 *function_ =
"unknown";
191 static std::string * name_ =
nullptr;
192 if (name_ ==
nullptr)
194 name_ =
new std::string;
195 *name_ =
"unknown exception";
203 static std::string * what_ =
nullptr;
204 if (what_ ==
nullptr)
206 what_ =
new std::string;
~GlobalExceptionHandler()
Definition: GlobalExceptionHandler.h:84
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
static GlobalExceptionHandler & getInstance()
The accessor for the singleton. It also serves as a replacement for the constructor.
Definition: GlobalExceptionHandler.h:88
static std::string & what_()
wrapper for static member what_
Definition: GlobalExceptionHandler.h:201
OpenMS global exception handler.
Definition: GlobalExceptionHandler.h:53
static std::string & name_()
wrapper for static member name_
Definition: GlobalExceptionHandler.h:189
GlobalExceptionHandler(const GlobalExceptionHandler &)
private version of c'tor to avoid initialization
Definition: GlobalExceptionHandler.h:82
static std::string & function_()
wrapper for static member function_
Definition: GlobalExceptionHandler.h:177
static int & line_()
wrapper for static member line_
Definition: GlobalExceptionHandler.h:165