59static const char *err_messages[] = {
60 "Undefined error",
"Unknown error",
"Internal error",
"No such file",
"No such variable",
61 "Malformed expression",
"No authorization",
"Cannot read file",
"Not Implemented",
""};
94 DBG(cerr <<
"empty: " << empty <<
", message: " << message << endl);
95 return empty || message;
108 throw InternalErr(__FILE__, __LINE__,
"Null input stream");
128 if (!status || !arg.
status())
129 throw InternalErr(__FILE__, __LINE__,
"Error parsing error object!");
147 fprintf(out,
"Error {\n");
149 fprintf(out,
" code = %d;\n",
static_cast<int>(
_error_code));
158 fprintf(out,
"};\n");
176 strm <<
" code = " <<
static_cast<int>(
_error_code) <<
";\n";
int Errorparse(libdap::parser_arg *arg)
void Error_delete_buffer(void *buffer)
void Error_switch_to_buffer(void *new_buffer)
void * Error_buffer(FILE *fp)
#define undefined_error
Undefined error code, an empty Error object was built.
#define cannot_read_file
(400)
Error & operator=(const Error &rhs)
void set_error_message(std::string msg="")
void set_error_code(ErrorCode ec=undefined_error)
void print(FILE *out) const
std::string _error_message
ErrorCode get_error_code() const
std::string get_error_message() const
bool parse(FILE *fp)
Parse an Error object.
bool OK() const
Is the Error object valid?
A class for software fault reporting.
top level DAP object to house generic methods
int ErrorCode
An enumerated type for common errors.
Pass parameters by reference to a parser.