|
MPQC
3.0.0-alpha
|
This is a std::exception specialization that records information about where an exception took place. More...
#include <util/class/scexception.h>

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 ClassDesc * | class_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. | |
This is a std::exception specialization that records information about where an exception took place.
| 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.
| 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.
| 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.