33 #include "BESExceptionManager.h" 36 #include "TheBESKeys.h" 37 #include "BESInfoList.h" 39 #define DEFAULT_ADMINISTRATOR "support@opendap.org" 43 BESExceptionManager::BESExceptionManager()
47 BESExceptionManager::~BESExceptionManager()
66 _ehm_list.push_back(ehm);
93 ehm_iter i = _ehm_list.begin();
94 for (; i != _ehm_list.end(); i++) {
96 int handled = p(e, dhi);
102 dhi.
error_info = BESInfoList::TheList()->build_info();
103 string action_name = dhi.action_name;
104 if (action_name ==
"") action_name =
"BES";
107 string administrator =
"";
111 string key =
"BES.ServerAdministrator";
115 administrator = DEFAULT_ADMINISTRATOR;
117 if (administrator.empty()) {
118 administrator = DEFAULT_ADMINISTRATOR;
136 strm << BESIndent::LMarg <<
"BESExceptionManager::dump - (" << (
void *)
this <<
")" << endl;
138 strm << BESIndent::LMarg <<
"# registered callbacks: " << _ehm_list.size() << endl;
139 BESIndent::UnIndent();
143 BESExceptionManager::TheEHM()
145 if (_instance == 0) {
virtual void add_ehm_callback(p_bes_ehm ehm)
Register an exception handler with the manager.
virtual int get_error_type()
Return the return code for this error class.
Abstract exception class for the BES with basic string message.
virtual void add_exception(BESError &e, const string &admin)
add exception information to this informational object
manages exception handling code and default exceptions
void get_value(const string &s, string &val, bool &found)
Retrieve the value of a given key, if set.
virtual void dump(ostream &strm) const
dumps information about this object
Structure storing information used by the BES to handle the request.
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
BESInfo * error_info
error information object
virtual int handle_exception(BESError &e, BESDataHandlerInterface &dhi)
Manage any exceptions thrown during the handling of a request.
static BESKeys * TheKeys()