#include <Error.h>
Inheritance diagram for Error:
Public Member Functions | |
Error (const Error ©_from) | |
Error () | |
Error (string msg) | |
Error (ErrorCode ec, string msg) | |
ErrorCode | get_error_code () const |
string | get_error_message () const |
bool | OK () const |
Is the Error object valid? | |
Error & | operator= (const Error &rhs) |
bool | parse (FILE *fp) |
Parse an Error object. | |
void | print (ostream &out) const |
void | print (FILE *out) const |
void | set_error_code (ErrorCode ec=undefined_error) |
void | set_error_message (string msg="") |
virtual | ~Error () |
Protected Attributes | |
ErrorCode | _error_code |
string | _error_message |
This class is used on both clients and servers. The print() and parse() methods are used to send the object back and forth.
Definition at line 88 of file Error.h.
Error::Error | ( | ErrorCode | ec, | |
string | msg | |||
) |
Error::Error | ( | string | msg | ) |
Error::Error | ( | ) |
ErrorCode Error::get_error_code | ( | ) | const |
Get the ErrorCode for this instance.
Definition at line 248 of file Error.cc.
References _error_code, and OK().
Here is the call graph for this function:
string Error::get_error_message | ( | ) | const |
Return the current error message.
Definition at line 277 of file Error.cc.
References _error_message, and OK().
Referenced by main(), AISMerge::merge(), and parse().
Here is the call graph for this function:
bool Error::OK | ( | ) | const |
Use this function to determine whether an Error object is valid. To be a valid, an Error object must either be: 1) empty or contain a message and a code.
Definition at line 134 of file Error.cc.
References _error_code, _error_message, DBG, and undefined_error.
Referenced by get_error_code(), get_error_message(), InternalErr::OK(), operator=(), parse(), and print().
Definition at line 111 of file Error.cc.
References _error_code, _error_message, and OK().
Here is the call graph for this function:
bool Error::parse | ( | FILE * | fp | ) |
Given an input stream (FILE *) fp
, parse an Error object from stream. Values for fields of the Error object are parsed and this
is set accordingly. This is how a client program receives an error object from a server.
fp | A valid file pointer to an input stream. |
Definition at line 157 of file Error.cc.
References Error_buffer(), Error_delete_buffer(), Error_switch_to_buffer(), Errorparse(), get_error_message(), OK(), and parser_arg::status().
Referenced by Connect::request_das(), Connect::request_das_url(), Connect::request_dds(), Connect::request_dds_url(), Connect::request_ddx(), and Connect::request_ddx_url().
Here is the call graph for this function:
void Error::print | ( | ostream & | strm | ) | const |
Creates a printable representation of the Error object. It is suitable for framing, and also for printing and sending over a network.
The printed representation produced by this function can be parsed by the parse() member function. Thus parse and print form a symmetrical pair that can be used to send and receive an Error object over the network in a MIME document.
out | A reference to the output stream on which the Error object is to be rendered. |
Definition at line 228 of file Error.cc.
References _error_code, _error_message, and OK().
Here is the call graph for this function:
void Error::print | ( | FILE * | out | ) | const |
Creates a printable representation of the Error object. It is suitable for framing, and also for printing and sending over a network.
The printed representation produced by this function can be parsed by the parse() member function. Thus parse and print form a symmetrical pair that can be used to send and receive an Error object over the network in a MIME document.
out | A pointer to the output stream on which the Error object is to be rendered. |
Definition at line 199 of file Error.cc.
References _error_code, _error_message, and OK().
Referenced by AlarmHandler::handle_signal().
Here is the call graph for this function:
void Error::set_error_code | ( | ErrorCode | ec = undefined_error |
) |
void Error::set_error_message | ( | string | msg = "" |
) |
ErrorCode Error::_error_code [protected] |
Definition at line 91 of file Error.h.
Referenced by get_error_code(), InternalErr::InternalErr(), OK(), operator=(), print(), ResponseTooBigErr::ResponseTooBigErr(), and SignalHandlerRegisteredErr::SignalHandlerRegisteredErr().
string Error::_error_message [protected] |
Definition at line 92 of file Error.h.
Referenced by get_error_message(), InternalErr::InternalErr(), OK(), operator=(), print(), ResponseTooBigErr::ResponseTooBigErr(), set_error_message(), and SignalHandlerRegisteredErr::SignalHandlerRegisteredErr().