66 if (globalExceptionHandler_ ==
nullptr)
70 return *globalExceptionHandler_;
79 static void setName(
const std::string & name)
94 static void setFile(
const std::string & file)
104 static void set(
const std::string & file,
int line,
const std::string &
function,
105 const std::string & name,
const std::string & message)
115 static
void newHandler();
127 static std::
string & file_()
129 static std::string * file_ =
nullptr;
130 if (file_ ==
nullptr)
132 file_ =
new std::string;
141 static int * line_ =
nullptr;
142 if (line_ ==
nullptr)
153 static std::string * function_ =
nullptr;
154 if (function_ ==
nullptr)
156 function_ =
new std::string;
157 *function_ =
"unknown";
165 static std::string * name_ =
nullptr;
166 if (name_ ==
nullptr)
168 name_ =
new std::string;
169 *name_ =
"unknown exception";
177 static std::string * what_ =
nullptr;
178 if (what_ ==
nullptr)
180 what_ =
new std::string;
OpenMS global exception handler.
Definition: GlobalExceptionHandler.h:28
static GlobalExceptionHandler & getInstance()
The accessor for the singleton. It also serves as a replacement for the constructor.
Definition: GlobalExceptionHandler.h:62
static void setFunction(const std::string &function)
static void setName(const std::string &name)
static void terminate()
The OPENMS replacement for terminate.
GlobalExceptionHandler()
Default constructor.
static void setFile(const std::string &file)
~GlobalExceptionHandler()
Definition: GlobalExceptionHandler.h:58
static int & line_()
wrapper for static member line_
Definition: GlobalExceptionHandler.h:139
static void set(const std::string &file, int line, const std::string &function, const std::string &name, const std::string &message)
static std::string & what_()
wrapper for static member what_
Definition: GlobalExceptionHandler.h:175
static std::string & function_()
wrapper for static member function_
Definition: GlobalExceptionHandler.h:151
static void setMessage(const std::string &message)
static void setLine(int line)
static std::string & name_()
wrapper for static member name_
Definition: GlobalExceptionHandler.h:163
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19