In file No file:

void set_mime_error (ostream &os, int code = HTERR_NOT_FOUND, const string &reason = "Dataset not found", const string &version = DVR)

Set the MIME text type to ``error.''

Documentation

The reply to a DODS client is in the form of a multi-part MIME message. You can use this function to create a MIME header for a message signaling an error. Here is an example of use from the JGOFS DDS filter program: \begin{verbatim} if(argc < 2) { ErrMsgT("One parameter, filename, must be sent (jg_dds)"); set_mime_error(HTERR_NO_CONTENT, "Internal error in DODS attribute server"); exit(1); } \end{verbatim}
Parameters:
os - A Stream object to which the MIME header is written.
code - An error code for the given error.
reason - A simple character string with a message to be sent to the client.
See Also:
ErrMsgT

alphabetic index hierarchy of classes


generated by doc++