libdap::ResponseTooBigErr Class Reference

`#include <ResponseTooBigErr.h>`

Inheritance diagram for libdap::ResponseTooBigErr:

## Public Member Functions

ErrorCode | get_error_code () const
string | get_error_message () const
bool | OK () const
| Is the Error object valid? More...
bool | parse (FILE *fp)
| Parse an Error object. More...
void | print (FILE *out) const
void | print (ostream &out) const
| ResponseTooBigErr (const string &msg)
void | set_error_code (ErrorCode ec=undefined_error)
void | set_error_message (string msg="")

## Protected Attributes

ErrorCode | _error_code
string | _error_message

## Detailed Description

ResponseTooBigErr is thrown by HTTPCache::parse_header and write_body if the response that's being cached is too big. The HTTPCache methods determine just what 'too big' means.

Author
  jhrg

Definition at line 45 of file ResponseTooBigErr.h.

## Member Function Documentation

## get_error_code()

ErrorCode libdap::Error::get_error_code | ( |  | ) | const

inherited

Get the ErrorCode for this instance.

Definition at line 247 of file Error.cc.

## get_error_message()

string libdap::Error::get_error_message | ( |  | ) | const

inherited

Return the current error message.

Definition at line 276 of file Error.cc.

## OK()

bool libdap::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 133 of file Error.cc.

## parse()

bool libdap::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 156 of file Error.cc.

## print() [1/2]

void libdap::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 198 of file Error.cc.

## print() [2/2]

void libdap::Error::print | ( | ostream & | strm | ) | 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

  strm | A reference to the output stream on which the Error object is to be rendered.

Definition at line 227 of file Error.cc.

## set_error_code()

void libdap::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 260 of file Error.cc.

## set_error_message()

void libdap::Error::set_error_message | ( | string | msg = `""` | ) |

inherited

Set the error message.

Definition at line 285 of file Error.cc.

The documentation for this class was generated from the following files:

- ResponseTooBigErr.h
- ResponseTooBigErr.cc