MPQC  3.0.0-alpha
Public Member Functions
sc::SCException Class Reference

This is a std::exception specialization that records information about where an exception took place. More...

#include <util/class/scexception.h>

Inheritance diagram for sc::SCException:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SCException (const char *description=0, const char *file=0, int line=0, const ClassDesc *class_desc=0, const char *exception_type="SCException") throw ()
 Create an SCException.
 SCException (const SCException &) throw ()
const char * what () const throw ()
 Reimplementation of std::exception::what().
const char * description () const throw ()
 Returns a description of what caused the exception.
const char * file () const throw ()
 Returns the name of the file in which the exception was created.
int line () const throw ()
 Returns the line number where the exception was created.
const ClassDescclass_desc () const throw ()
 Returns the class descriptor of the object which generated the exception.
const char * exception_type () const throw ()
 Returns the classname of the exception. May return null.
std::ostream & elaborate ()
 Returns a stream where addition information about the exception can be written.

Detailed Description

This is a std::exception specialization that records information about where an exception took place.


Constructor & Destructor Documentation

sc::SCException::SCException ( const char *  description = 0,
const char *  file = 0,
int  line = 0,
const ClassDesc class_desc = 0,
const char *  exception_type = "SCException" 
) throw ()

Create an SCException.

Parameters:
descriptiona description of the problem.
filethe file name where the problem occured.
linethe line number where the exception occured.
class_descthe ClassDesc for the object causing the exception.
exception_typethe classname of the SCException specialization. The default is "SCException".

It is suggested that the special macros FILE and LINE be given as the file and line arguments, respectively.


Member Function Documentation

const ClassDesc* sc::SCException::class_desc ( ) const throw () [inline]

Returns the class descriptor of the object which generated the exception.

May return null.

const char* sc::SCException::description ( ) const throw () [inline]

Returns a description of what caused the exception.

May return null.

std::ostream& sc::SCException::elaborate ( )

Returns a stream where addition information about the exception can be written.

This will throw if a valid stream cannot be returned (possibly due to low memory).

Referenced by sc::LimitExceeded< T >::LimitExceeded().

const char* sc::SCException::file ( ) const throw () [inline]

Returns the name of the file in which the exception was created.

May return null.

int sc::SCException::line ( ) const throw () [inline]

Returns the line number where the exception was created.

May return 0, if unknown.

const char* sc::SCException::what ( ) const throw ()

Reimplementation of std::exception::what().

The returned std::string is only valid for the lifetime of this object.


The documentation for this class was generated from the following file:

Generated at Sat Jul 7 2012 11:52:59 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.0.