gpucalc::ValueNotDeletedException Class Reference

#include <exception.h>

Inheritance diagram for gpucalc::ValueNotDeletedException:

Inheritance graph

List of all members.

Public Member Functions

virtual const std::string & getDescription () const
 Returns a string with only the 'description' field of this exception.
virtual const std::string & getFile () const
 gets source file name.
virtual const std::string & getFullDescription () const
 Returns a string with the full description of this error.
virtual long getLine () const
 gets line number.
virtual int getNumber () const throw ()
 gets the error code.
virtual const std::string & getSource () const
 gets the source function.
 ValueNotDeletedException (int number, const Object &object, const std::string &description, const std::string &source, const char *file, long line)
const char * what () const throw ()
 Override std::exception::what.

Protected Attributes

std::string mDescription
std::string mFile
std::string mFullDesc
long mLine
int mNumber
const ObjectmObject
std::string mSource
std::string mTypeName


Detailed Description

Definition at line 308 of file exception.h.


Constructor & Destructor Documentation

gpucalc::ValueNotDeletedException::ValueNotDeletedException ( int  number,
const Object object,
const std::string &  description,
const std::string &  source,
const char *  file,
long  line 
) [inline]

Definition at line 311 of file exception.h.

00311                                                                                                                                                     :
00312     Exception(number, object, description, source, "ValueNotDeletedException", file, line)
00313     {
00314     }
 };


Member Function Documentation

virtual const std::string& gpucalc::Exception::getDescription (  )  const [inline, virtual, inherited]

Returns a string with only the 'description' field of this exception.

Use getFullDescription() to get a full description of the error including line number, error number and what function threw the exception.

Definition at line 190 of file exception.h.

00191    {
00192     return mDescription;
00193    }

virtual const std::string& gpucalc::Exception::getFile (  )  const [inline, virtual, inherited]

gets source file name.

Definition at line 169 of file exception.h.

00170    {
00171     return mFile;
00172    }

const std::string & gpucalc::Exception::getFullDescription (  )  const [virtual, inherited]

Returns a string with the full description of this error.

Remarks:
The description contains the error number, the description supplied by the thrower, what routine threw the exception, and will also supply extra platform-specific information where applicable. For example - in the case of a 3rd party library error, the description of the error will include both the place in which gpucalc found the problem, and a text description from the 3rd party library, if available.

Definition at line 81 of file exception.cpp.

00082  {
00083   if (mFullDesc.empty())
00084   {
00085    std::ostringstream desc;
00086    desc << "EXCEPTION(" << mNumber << ":" << mTypeName << "): "
00087     << mDescription << " in " << mSource;
00088 
00089    if (mLine > 0)
00090    {
00091     desc << " at " << mFile << " (line " << mLine << ")";
00092    }
00093    mFullDesc = desc.str();
00094   }
00095   return mFullDesc;
00096  }

virtual long gpucalc::Exception::getLine (  )  const [inline, virtual, inherited]

gets line number.

Definition at line 178 of file exception.h.

00179    {
00180     return mLine;
00181    }

int gpucalc::Exception::getNumber (  )  const throw () [virtual, inherited]

gets the error code.

Definition at line 99 of file exception.cpp.

00100  {
00101   return mNumber;
00102  }

virtual const std::string& gpucalc::Exception::getSource (  )  const [inline, virtual, inherited]

gets the source function.

Definition at line 160 of file exception.h.

00161    {
00162     return mSource;
00163    }

const char* gpucalc::Exception::what (  )  const throw () [inline, inherited]

Override std::exception::what.

Definition at line 199 of file exception.h.

00200    {
00201     return getFullDescription().c_str();
00202    }


Member Data Documentation

std::string gpucalc::Exception::mDescription [protected, inherited]

Definition at line 94 of file exception.h.

std::string gpucalc::Exception::mFile [protected, inherited]

Definition at line 96 of file exception.h.

std::string gpucalc::Exception::mFullDesc [mutable, protected, inherited]

Definition at line 97 of file exception.h.

long gpucalc::Exception::mLine [protected, inherited]

Definition at line 90 of file exception.h.

int gpucalc::Exception::mNumber [protected, inherited]

Definition at line 92 of file exception.h.

const Object* gpucalc::Exception::mObject [protected, inherited]

Definition at line 91 of file exception.h.

std::string gpucalc::Exception::mSource [protected, inherited]

Definition at line 95 of file exception.h.

std::string gpucalc::Exception::mTypeName [protected, inherited]

Definition at line 93 of file exception.h.


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

Generated on Thu Mar 5 22:36:46 2009 for gpucalc by  doxygen 1.5.6