BESDapHandlerException Class Reference

#include <BESDapHandlerException.h>

Inheritance diagram for BESDapHandlerException:

Inheritance graph
[legend]
Collaboration diagram for BESDapHandlerException:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BESDapHandlerException (const string &s, const string &file, int line, ErrorCode ec)
virtual ~BESDapHandlerException ()
int get_error_code ()
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_context (const string &context)
 Set the context name of the error class.
virtual string get_context ()
 Return the context name of the error class.
virtual void set_return_code (int return_code)
 Set the return code for this particular error class.
virtual int get_return_code ()
 Return the return code for this error class.
virtual void dump (ostream &strm) const
 Displays debug information about this object.

Static Public Member Functions

static int handleException (BESException &e, BESDataHandlerInterface &dhi)
 handles exceptions if the error context is set to dap2

Protected Member Functions

 BESDapHandlerException ()

Protected Attributes

string _msg
string _context
int _return_code
string _file
int _line


Detailed Description

Definition at line 40 of file BESDapHandlerException.h.


Constructor & Destructor Documentation

BESDapHandlerException::BESDapHandlerException (  )  [inline, protected]

Definition at line 45 of file BESDapHandlerException.h.

BESDapHandlerException::BESDapHandlerException ( const string &  s,
const string &  file,
int  line,
ErrorCode  ec 
) [inline]

Definition at line 47 of file BESDapHandlerException.h.

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

Definition at line 53 of file BESDapHandlerException.h.


Member Function Documentation

int BESDapHandlerException::get_error_code (  )  [inline]

Definition at line 54 of file BESDapHandlerException.h.

Referenced by handleException().

int BESDapHandlerException::handleException ( BESException e,
BESDataHandlerInterface dhi 
) [static]

handles exceptions if the error context is set to dap2

If the error context from the BESContextManager is set to dap2 then handle all exceptions by returning transmitting them as dap2 error messages.

Parameters:
e exception to be handled
dhi structure that holds request and response information

Definition at line 51 of file BESDapHandlerException.cc.

References BES_EXECUTED_OK, _BESDataHandlerInterface::error_info, BESContextManager::get_context(), get_error_code(), BESException::get_message(), _BESDataHandlerInterface::get_output_stream(), BESException::get_return_code(), BESException::set_message(), and BESContextManager::TheManager().

Referenced by BESDapModule::initialize().

Here is the call graph for this function:

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

set the error message for this exception

Parameters:
s message string

Definition at line 70 of file BESException.h.

References BESException::_msg.

Referenced by handleException().

virtual string BESException::get_message (  )  [inline, virtual, inherited]

get the error message for this exception

Returns:
error message

Definition at line 75 of file BESException.h.

References BESException::_msg.

Referenced by BESInfo::add_exception(), BESCatalogDirectory::BESCatalogDirectory(), BESContainerStorageCatalog::BESContainerStorageCatalog(), BESMemoryGlobalArea::BESMemoryGlobalArea(), BESApacheInterface::exception_manager(), handleException(), BESModuleApp::initialize(), BESBaseApp::initialize(), baseApp::initialize(), main(), zT::run(), uncompressT::run(), regexT::run(), pvolT::run(), pfileT::run(), lockT::run(), keysT::run(), gzT::run(), containerT::run(), cacheT::run(), bz2T::run(), agglistT::run(), BESModuleApp::terminate(), and test_this().

virtual string BESException::get_file (  )  [inline, virtual, inherited]

get the file name where the exception was thrown

Returns:
file name

Definition at line 80 of file BESException.h.

References BESException::_file.

Referenced by BESInfo::add_exception(), BESCatalogDirectory::BESCatalogDirectory(), and BESContainerStorageCatalog::BESContainerStorageCatalog().

virtual int BESException::get_line (  )  [inline, virtual, inherited]

get the line number where the exception was thrown

Returns:
line number

Definition at line 85 of file BESException.h.

References BESException::_line.

Referenced by BESInfo::add_exception(), BESCatalogDirectory::BESCatalogDirectory(), and BESContainerStorageCatalog::BESContainerStorageCatalog().

virtual void BESException::set_context ( const string &  context  )  [inline, virtual, inherited]

Set the context name of the error class.

Gives the error context, such as response or request or transmit

Parameters:
context name of the context

Definition at line 92 of file BESException.h.

References BESException::_context.

Referenced by BESAggregationException::BESAggregationException(), BESContainerStorageException::BESContainerStorageException(), BESDatabaseException::BESDatabaseException(), BESDebugException::BESDebugException(), BESHandlerException::BESHandlerException(), BESIncorrectRequestException::BESIncorrectRequestException(), BESKeysException::BESKeysException(), BESLogException::BESLogException(), BESMemoryException::BESMemoryException(), BESParserException::BESParserException(), BESResponseException::BESResponseException(), BESTransmitException::BESTransmitException(), and TestException::TestException().

virtual string BESException::get_context (  )  [inline, virtual, inherited]

Return the context name of the error class.

Gives the error context, such as response or request or transmit

Returns:
context string

Definition at line 102 of file BESException.h.

References BESException::_context.

Referenced by BESInfo::add_exception().

virtual void BESException::set_return_code ( int  return_code  )  [inline, virtual, inherited]

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 110 of file BESException.h.

References BESException::_return_code.

Referenced by BESAggregationException::BESAggregationException(), BESContainerStorageException::BESContainerStorageException(), BESDatabaseException::BESDatabaseException(), BESDebugException::BESDebugException(), BESHandlerException::BESHandlerException(), BESIncorrectRequestException::BESIncorrectRequestException(), BESKeysException::BESKeysException(), BESLogException::BESLogException(), BESMemoryException::BESMemoryException(), BESParserException::BESParserException(), BESResponseException::BESResponseException(), BESTransmitException::BESTransmitException(), and TestException::TestException().

virtual int BESException::get_return_code (  )  [inline, virtual, inherited]

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 121 of file BESException.h.

References BESException::_return_code.

Referenced by BESExceptionManager::handle_exception(), and handleException().

void BESException::dump ( ostream &  strm  )  const [virtual, inherited]

Displays debug information about this object.

dumps information about this object

Parameters:
strm output stream to use to dump the contents of this object
Displays the pointer value of this instance along with the exception message, the file from which the exception was generated, and the line number in that file.

Parameters:
strm C++ i/o stream to dump the information to

Implements BESObj.

Reimplemented in BESContainerStorageException.

Definition at line 44 of file BESException.cc.

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

Referenced by BESContainerStorageException::dump().

Here is the call graph for this function:


Member Data Documentation

string BESException::_msg [protected, inherited]

Definition at line 49 of file BESException.h.

Referenced by BESException::BESException(), BESException::dump(), BESException::get_message(), and BESException::set_message().

string BESException::_context [protected, inherited]

Definition at line 50 of file BESException.h.

Referenced by BESException::get_context(), and BESException::set_context().

int BESException::_return_code [protected, inherited]

Definition at line 51 of file BESException.h.

Referenced by BESException::get_return_code(), and BESException::set_return_code().

string BESException::_file [protected, inherited]

Definition at line 52 of file BESException.h.

Referenced by BESException::dump(), and BESException::get_file().

int BESException::_line [protected, inherited]

Definition at line 53 of file BESException.h.

Referenced by BESException::dump(), and BESException::get_line().


The documentation for this class was generated from the following files:
Generated on Sat Jan 19 04:13:00 2008 for OPeNDAP Back End Server (BES) by  doxygen 1.5.4