Class Index Cross Index Namespace Index

Class General::LDASUnexpected

A singleton class to initialise unexpected()
Contained in: General
Derived from: none
Derived by: none

#include "general/LDASUnexpected.hh"


public function member index:

~LDASUnexpected(); Destructor
static void makeAbort(bool Abort); Specify if process should abort (thereby providing a core)
static void makeQuiet(); Turn off logging
static void makeVerbose(); Turn on logging
 

private function member index:

LDASUnexpected(); Constructor (private)
static void unexpected(); The replacement for unexpected()
 

Description:

Linking against a library that includes this header file will automatically turn on special handling for bad exceptions.

If used inside an LDAS API, unexpected exceptions will be logged to the API's log by default. This indicates that a function threw an exception which was not in its exception specification.


Function Member Descriptions:


General::LDASUnexpected::LDASUnexpected - Constructor (private)


LDASUnexpected();
No instances of this object may be created outside of the class itself




General::LDASUnexpected::~LDASUnexpected - Destructor


~LDASUnexpected();
Resets the unexpected handler back to its original value




General::LDASUnexpected::makeAbort - Specify if process should abort (thereby providing a core)


static void makeAbort(bool Abort);
By default, aborting is turned off. By passing true, the library will abort allowing for stack tracing with a debugger. This will allow for faster location of Unexpected exceptions.

Parameters:
ParameterDescription
bool Aborttrue to dump core, false otherwise.



General::LDASUnexpected::makeQuiet - Turn off logging


static void makeQuiet();
By default, logging is on. Shouldn't be turned off unless you really want to suppress error reporting




General::LDASUnexpected::makeVerbose - Turn on logging


static void makeVerbose();
By default, logging is on




General::LDASUnexpected::unexpected - The replacement for unexpected()


static void unexpected();



Variable Member Descriptions:


General::LDASUnexpected::TheLDASUnexpected - The single instance of LDASUnexpected

static const LDASUnexpected TheLDASUnexpected;
Having a static instance of the class ensures that initialisation is done during library initialisation. It would not be thread-safe to allow initialisation after main() has been entered.


General::LDASUnexpected::m_abort - The current abort status

static bool m_abort;

General::LDASUnexpected::m_logging - The current logging status

static bool m_logging;

General::LDASUnexpected::m_old - Storage for the original unexpected handler

unexpected_handler m_old;