Metadata error(3)

From BRTT

Jump to: navigation, search


Contents

NAME

MetadataError - Metadata object error facility

SYNOPSIS

#include "Metadata.h"
using namespace SEISPP;
class MetadataError
class MetadataGetError : public MetadataError
class MetadataParseError : public MetadataError

SUPPORT

Contributed: NO BRTT support -- please contact author.

DESCRIPTION

The set of MetadataError objects are companions to the variable length header concept Metadata(3) object. Some of the metadata object functions will throw MetadataError or the derived classes listed in the Synopsis. Error handlers can be written to trap these exceptions using real time type checking to sort out which actual type is thrown (see classic books by Stoustrup or other books on C++ for examples).


A MetadataError is a generic error object that contains little more than an error message that can be sent to stderr using a function called log_error().


The derived classes MetadataGetError and MetadataParseError are more specific. A MetadataGetError may be thrown by any of the "get" metadata functions. The most common reason is that the parameter with the requested name either did not exist in the metadata object or there was a type mismatch. The assumption is that a handler need only know that the get process failed and it should give the user feedback on why it might have failed. Hence, it contains only an extended message facility to dump the error message using the log_error() function.


The MetadataParseError function is implementation specific. The metadata object as currently defined uses an Antelope Pf "object" to store the abstract concept I've called "metadata." A MetadataParseError is thrown by metadata constructors when a parameter file or string used to build the Pf fails on a pfcompile error. A MetadataParseError object thus contains the log_error() function plus an integer variable called error_code that contains the error code from pfcompile.

LIBRARY

-lseispp

SEE ALSO

TimeSeries(3),SeisppError(3),
http://geology.indiana.edu/pavlis/software/seispp/html/index.html

BUGS AND CAVEATS

This is a fairly simple error object definition. It might evolve as time goes on.

AUTHOR

Gary L. Pavlis
Indiana University
pavlis@indiana.edu
Antelope Contributed Software
Last Modified 2012-03-15