AISDatabaseReadFailed Class Reference

#include <AISExceptions.h>

Inheritance diagram for AISDatabaseReadFailed:

Inheritance graph
[legend]
Collaboration diagram for AISDatabaseReadFailed:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AISDatabaseReadFailed (const string &msg)
 AISDatabaseReadFailed ()
ErrorCode get_error_code () const
 Get the error code.
string get_error_message () const
 Get the error message.
bool OK () const
 Class invariant.
bool parse (FILE *fp)
 Deserailze object from the wire.
void print (FILE *out) const
 Print the Error object on the given output stream.
void set_error_code (ErrorCode ec=undefined_error)
 Set the error code.
void set_error_message (string msg="")
 Set the error message.

Protected Attributes

ErrorCode _error_code
string _error_message
char * _program
 deprecated; don't use
ProgramType _program_type
 deprecated; don't use


Detailed Description

Thrown when the AIS database/document cannot be read.

Definition at line 43 of file AISExceptions.h.


Constructor & Destructor Documentation

AISDatabaseReadFailed::AISDatabaseReadFailed (  )  [inline]

Definition at line 46 of file AISExceptions.h.

AISDatabaseReadFailed::AISDatabaseReadFailed ( const string &  msg  )  [inline]

Definition at line 48 of file AISExceptions.h.


Member Function Documentation

ErrorCode Error::get_error_code (  )  const [inherited]

Get the ErrorCode for this instance.

Definition at line 260 of file Error.cc.

References Error::_error_code, and Error::OK().

Here is the call graph for this function:

string Error::get_error_message (  )  const [inherited]

Return the current error message.

Definition at line 296 of file Error.cc.

References Error::_error_message, and Error::OK().

Referenced by main(), AISMerge::merge(), and Error::parse().

Here is the call graph for this function:

bool Error::OK (  )  const [inherited]

Is the Error object valid?

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.

Returns:
TRUE if the object is valid, FALSE otherwise.

Definition at line 151 of file Error.cc.

References Error::_error_code, Error::_error_message, DBG, and undefined_error.

Referenced by Error::get_error_code(), Error::get_error_message(), InternalErr::OK(), Error::operator=(), Error::parse(), and Error::print().

bool Error::parse ( FILE *  fp  )  [inherited]

Parse an Error object.

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.

Parameters:
fp A valid file pointer to an input stream.
Returns:
TRUE if no error was detected, FALSE otherwise.

Definition at line 174 of file Error.cc.

References Error_buffer(), Error_delete_buffer(), Error_switch_to_buffer(), Errorparse(), Error::get_error_message(), Error::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 ( FILE *  out  )  const [inherited]

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.

Parameters:
out A pointer to the output stream on which the Error object is to be rendered.

Definition at line 216 of file Error.cc.

References Error::_error_code, Error::_error_message, Error::_program, Error::_program_type, Error::OK(), and undefined_prog_type.

Referenced by AlarmHandler::handle_signal().

Here is the call graph for this function:

void Error::set_error_code ( ErrorCode  ec = undefined_error  )  [inherited]

Set the ErrorCode. If the current error message has not been set, use ec to set the error message. The resulting error message string is the same as the ErrorCode name. If ec is not within the range of values for an OPeNDAP ErrorCode, the error message is left unchanged.

Parameters:
ec The new ErrorCode value.

Definition at line 273 of file Error.cc.

void Error::set_error_message ( string  msg = ""  )  [inherited]

Set the error message.

Definition at line 305 of file Error.cc.

References Error::_error_message.


Member Data Documentation

ErrorCode Error::_error_code [protected, inherited]

Definition at line 98 of file Error.h.

Referenced by Error::get_error_code(), InternalErr::InternalErr(), Error::OK(), Error::operator=(), Error::print(), ResponseTooBigErr::ResponseTooBigErr(), and SignalHandlerRegisteredErr::SignalHandlerRegisteredErr().

string Error::_error_message [protected, inherited]

Definition at line 99 of file Error.h.

Referenced by Error::get_error_message(), InternalErr::InternalErr(), Error::OK(), Error::operator=(), Error::print(), ResponseTooBigErr::ResponseTooBigErr(), Error::set_error_message(), and SignalHandlerRegisteredErr::SignalHandlerRegisteredErr().

char* Error::_program [protected, inherited]

Definition at line 101 of file Error.h.

Referenced by Error::Error(), Error::operator=(), Error::print(), and Error::~Error().

ProgramType Error::_program_type [protected, inherited]

Definition at line 100 of file Error.h.

Referenced by Error::operator=(), and Error::print().


The documentation for this class was generated from the following file:
Generated on Fri Feb 8 05:15:42 2008 for libdap++ by  doxygen 1.5.4