BESError Class Reference

Abstract exception class for the BES with basic string message. More...

#include <BESError.h>

Inheritance diagram for BESError:

Inheritance graph
[legend]
Collaboration diagram for BESError:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BESError (const string &msg, unsigned int type, const string &file, unsigned int line)
 constructor that takes message, type of error, source file the error originated and the line number in the source file
virtual ~BESError ()
virtual void set_message (const string &msg)
 set the error message for this exception
virtual string get_message ()
 get the error message for this exception
virtual string get_file ()
 get the file name where the exception was thrown
virtual int get_line ()
 get the line number where the exception was thrown
virtual void set_error_type (int type)
 Set the return code for this particular error class.
virtual int get_error_type ()
 Return the return code for this error class.
virtual void dump (ostream &strm) const
 Displays debug information about this object.

Protected Member Functions

 BESError ()

Protected Attributes

string _msg
unsigned int _type
string _file
unsigned int _line

Detailed Description

Abstract exception class for the BES with basic string message.

Definition at line 51 of file BESError.h.


Constructor & Destructor Documentation

BESError::BESError (  )  [inline, protected]

Definition at line 59 of file BESError.h.

References _msg.

BESError::BESError ( const string &  msg,
unsigned int  type,
const string &  file,
unsigned int  line 
) [inline]

constructor that takes message, type of error, source file the error originated and the line number in the source file

Parameters:
msg error message
type type of error generated. Default list of error types are defined above as internal error, internal fatal error, syntax/user error, resource forbidden error, resource not found error.

Definition at line 69 of file BESError.h.

virtual BESError::~BESError (  )  [inline, virtual]

Definition at line 77 of file BESError.h.


Member Function Documentation

virtual void BESError::set_message ( const string &  msg  )  [inline, virtual]

set the error message for this exception

Parameters:
msg message string

Definition at line 83 of file BESError.h.

References _msg.

Referenced by BESDapError::handleException().

virtual string BESError::get_message (  )  [inline, virtual]

get the error message for this exception

Returns:
error message

Definition at line 88 of file BESError.h.

References _msg.

Referenced by BESInfo::add_exception(), BESMemoryGlobalArea::BESMemoryGlobalArea(), PPTClient::closeConnection(), BESApacheInterface::exception_manager(), BESInterface::finish(), BESDapError::handleException(), PPTClient::initConnection(), BESModuleApp::initialize(), BESBaseApp::initialize(), main(), ServerApp::run(), CmdApp::run(), and BESModuleApp::terminate().

virtual string BESError::get_file (  )  [inline, virtual]

get the file name where the exception was thrown

Returns:
file name

Definition at line 93 of file BESError.h.

References _file.

Referenced by BESInfo::add_exception().

virtual int BESError::get_line (  )  [inline, virtual]

get the line number where the exception was thrown

Returns:
line number

Definition at line 98 of file BESError.h.

References _line.

Referenced by BESInfo::add_exception().

virtual void BESError::set_error_type ( int  type  )  [inline, virtual]

Set the return code for this particular error class.

Sets the return code for this error class, which could represent the need to terminate or do something specific based on the error.

Parameters:
return_code code used when returning from the error

Definition at line 106 of file BESError.h.

References _type.

Referenced by BESDapError::BESDapError(), BESDapError::handleException(), and BESApacheInterface::validate_data_request().

virtual int BESError::get_error_type (  )  [inline, virtual]

Return the return code for this error class.

Returns the return code for this error class, which could represent the need to terminate or do something specific base on the error

Returns:
context string

Definition at line 114 of file BESError.h.

References _type.

Referenced by BESInfo::add_exception(), BESApacheInterface::exception_manager(), BESExceptionManager::handle_exception(), and BESDapError::handleException().

void BESError::dump ( ostream &  strm  )  const [virtual]

Displays debug information about this object.

Parameters:
strm output stream to use to dump the contents of this object

Implements BESObj.

Reimplemented in BESForbiddenError, BESInternalError, BESInternalFatalError, BESNotFoundError, and BESSyntaxUserError.

Definition at line 44 of file BESError.cc.

References _file, _line, _msg, _type, BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Referenced by BESSyntaxUserError::dump(), BESNotFoundError::dump(), BESInternalFatalError::dump(), BESInternalError::dump(), and BESForbiddenError::dump().

Here is the call graph for this function:


Member Data Documentation

string BESError::_msg [protected]

Definition at line 54 of file BESError.h.

Referenced by BESError(), dump(), get_message(), and set_message().

unsigned int BESError::_type [protected]

Definition at line 55 of file BESError.h.

Referenced by dump(), get_error_type(), and set_error_type().

string BESError::_file [protected]

Definition at line 56 of file BESError.h.

Referenced by dump(), and get_file().

unsigned int BESError::_line [protected]

Definition at line 57 of file BESError.h.

Referenced by dump(), and get_line().


The documentation for this class was generated from the following files:
Generated on Tue Mar 4 23:19:49 2008 for OPeNDAP Back End Server (BES) by  doxygen 1.5.1