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:
description a description of the problem.
file the file name where the problem occured.
line the line number where the exception occured.
class_desc the ClassDesc for the object causing the exception.
exception_type the 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 char* sc::SCException::what (  )  const throw ()

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

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

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

Returns a description of what caused the exception.

May return null.

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 ClassDesc* sc::SCException::class_desc (  )  const throw () [inline]

Returns the class descriptor of the object which generated 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().


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

Generated at Sun Feb 22 10:13:00 2009 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.5.6.
These pages are hosted on SourceForge.net