Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

RS::RSException Class Reference

Class used as the base class of all exceptions defined in RoboSoc. More...

Inheritance diagram for RS::RSException:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 RSException (const std::string &descr, const std::string &file_n="", const UInt32 line_no=0, const std::string &nme="RSException") throw ()
 Constructor for RSEcception.

 RSException (const RSException &) throw ()
 Copy constructor.

virtual ~RSException () throw ()
 A virtual destructor.

RSException & operator= (const RSException &) throw ()
 Assignment operator.

virtual const std::string What () const throw ()
 Find out what the exception is about, returns a C++ string.

virtual const char * what () const throw ()
 Find out what the exception is about, returns a C string.

void setDescription (const std::string &descr) throw ()
 Change the description of an exception.

const std::string & getDescription () throw ()
 Get the description of an exception.

void setName (const std::string &nme) throw ()
 Change the name of an exception.

const std::string & getName () throw ()
 Get the name of an exception.

void setFileName (const std::string &f_name) throw ()
 Change the filename of an exception, usually it represent the file where the exception was thrown.

const std::string & getFileName () throw ()
 Get the filename of the exception.

void setLineNumber (const UInt32 line_no) throw ()
 Change the line number of an exception, usually it represent the line number where the exception was thrown.

UInt32 getLineNumber () throw ()
 Get the line number of the exception.


Detailed Description

Class used as the base class of all exceptions defined in RoboSoc.

It inherits from std::exception which means that if the user tries to catch std::exception she will also catch RSException and all its child classes. Non of its methods are allowed to throw exceptions since then we could end up with a endless recursive throwing of exceptions.

Unit:
Library
Revision
1.2
Author
s02davro
Date
2002/08/31 14:57:59

Definition at line 82 of file RSException.h.


Constructor & Destructor Documentation

RS::RSException::RSException const std::string &    descr,
const std::string &    file_n = "",
const UInt32    line_no = 0,
const std::string &    nme = "RSException"
throw ()
 

Constructor for RSEcception.

No default value is allowed for the description string descr, since all exceptions should have a description. But it is possible for sub classes to have default constructors if they provide the description instead.

Definition at line 52 of file RSException.cc.


The documentation for this class was generated from the following files:
Generated on Mon Aug 29 08:22:33 2011 for RoboSoc by doxygen1.3-rc3