Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

GlobalExceptionHandler Class Reference
[Exceptions]

#include <OpenMS/CONCEPT/Exception.h>

List of all members.


Detailed Description

OpenMS global exception handler.

Public Member Functions

Constructors
 GlobalExceptionHandler () throw ()
 Default constructor.

Static Public Member Functions

Accessors
static void setName (const std::string &name) throw ()
static void setMessage (const std::string &message) throw ()
static void setLine (int line) throw ()
static void setFile (const std::string &file) throw ()
static void setFunction (const std::string &function) throw ()
static void set (const std::string &file, int line, const std::string &function, const std::string &name, const std::string &message) throw ()

Static Protected Member Functions

static void terminate () throw ()
 The OPENMS replacement for terminate.
static void newHandler () throw (OutOfMemory)
 The OPENMS new handler.

Static Protected Attributes

static std::string file_
static int line_
static std::string function_
static std::string name_
static std::string what_

Constructor & Destructor Documentation

GlobalExceptionHandler (  )  throw ()

Default constructor.

This constructor installs the OPENMS specific handlers for terminate, unexpected, and new_handler. terminate or unexpected are called to abort a program if an exception was not caught or a function exits via an exception that is not allowed by its exception specification. Both functions are replaced by a function of GlobalExceptionHandler that tries to determine the last exception thrown. This mechanism only works, if all exceptions are defrived from Base.

The default new_handler is replaced by newHandler and throws an exception of type OutOfMemory instead of bad_alloc (the default behaviour defined in the ANSI C++ standard).


Member Function Documentation

static void setName ( const std::string &  name  )  throw () [static]

static void setMessage ( const std::string &  message  )  throw () [static]

static void setLine ( int  line  )  throw () [static]

static void setFile ( const std::string &  file  )  throw () [static]

static void setFunction ( const std::string &  function  )  throw () [static]

static void set ( const std::string &  file,
int  line,
const std::string &  function,
const std::string &  name,
const std::string &  message 
) throw () [static]

static void terminate (  )  throw () [static, protected]

The OPENMS replacement for terminate.

static void newHandler (  )  throw (OutOfMemory) [static, protected]

The OPENMS new handler.


Member Data Documentation

std::string file_ [static, protected]

int line_ [static, protected]

std::string function_ [static, protected]

std::string name_ [static, protected]

std::string what_ [static, protected]


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:49 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1