BException Class Reference

#include <BException.h>

Inheritance diagram for BException:

Inheritance graph
[legend]

List of all members.


Detailed Description

GeoCore exception class.

Public Member Functions

 BException (const BString &msg, const BString &loc)
 Constructor.
 BException (const BString &msg, const BString &loc, const BString &details)
 Constructor.
 BException (const BException &source)
 Copy constructor.
 BException (const BString &msg)
 Constructor.
 BException ()
 Default constructor.
const BStringGetDescription (void) const
 Gets the description for this BException.
BString GetDetailedMessage (void) const
 Gets a formatted message that includes the description, location, and details.
const BStringGetDetails (void) const
 Gets the additional details associated with this BException.
const BStringGetLocation (void) const
 Gets the location from which this BException was thrown.
const BStringGetMessage (void) const
 Gets the current exception message.
void LogException (void)
 Writes the exception message to the log file.
void SetDetails (const BString &details)
 Sets additional details for this BException.
void SetLocation (const BString &loc)
 Sets the location from which this BException was thrown.
void SetMessage (const BString &msg)
 Sets the exception message.
virtual const char * what () const throw ()
 Overridden from std::exception.
virtual ~BException () throw ()
 Destructor.

Constructor & Destructor Documentation

BException (  )  [inline]

Default constructor.

BException ( const BString msg  )  [inline]

Constructor.

Parameters:
msg A message that describes this BException.

BException ( const BException source  )  [inline]

Copy constructor.

Parameters:
source The BException to copy.

BException ( const BString msg,
const BString loc,
const BString details 
) [inline]

Constructor.

Parameters:
msg A message that describes the BException.
loc The location where the exception occurred.
details Additional details associated with the exception.

BException ( const BString msg,
const BString loc 
) [inline]

Constructor.

Parameters:
msg A message that describes the BException.
loc The location where the exception occurred.

virtual ~BException (  )  throw () [inline, virtual]

Destructor.


Member Function Documentation

const BString& GetDescription ( void   )  const [inline]

Gets the description for this BException.

Returns:
The description associated with this BException.

BString GetDetailedMessage ( void   )  const

Gets a formatted message that includes the description, location, and details.

Returns:
A detailed message in the following format: <description> [<location>]: <details>

const BString& GetDetails ( void   )  const [inline]

Gets the additional details associated with this BException.

Returns:
The details associated with this BException.

const BString& GetLocation ( void   )  const [inline]

Gets the location from which this BException was thrown.

Returns:
The location from which this BException was thrown.

const BString& GetMessage ( void   )  const [inline]

Gets the current exception message.

Returns:
The exception message.

void LogException ( void   ) 

Writes the exception message to the log file.

If you construct a BException using the default constructor, then fill in the code, location, and details using the respective set-methods, then you must call this method if you want to log the exception. If you construct a BException using any of the other constructors, this will be done automatically.

void SetDetails ( const BString details  )  [inline]

Sets additional details for this BException.

Parameters:
details Additional details about this BException. An example would be a file name associated with a "file not found" exception.

void SetLocation ( const BString loc  )  [inline]

Sets the location from which this BException was thrown.

Parameters:
loc The location from which this BException was thrown. Generally, this will be a method name.

void SetMessage ( const BString msg  )  [inline]

Sets the exception message.

Parameters:
msg The new exception message.

virtual const char* what (  )  const throw () [virtual]

Overridden from std::exception.

Provides a description of this BException.

Returns:
A description of this BException.


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

GeoTranslate 5.0 From Blue Marble Geographics