version
0.0.1
Defines the C++ API for MsPASS
|
Error thrown when get operators fail. More...
#include <Metadata.h>
Public Member Functions | |
MetadataGetError (const std::string key, const char *Texpected) | |
MetadataGetError (const char *boostmessage, const std::string key, const char *Texpected, const char *Tactual) | |
Constructor called when type requested does not match contents. More... | |
MetadataGetError (const MetadataGetError &parent) | |
MetadataGetError | operator= (const MetadataGetError &parent) |
Public Member Functions inherited from mspass::utility::MsPASSError | |
MsPASSError () | |
MsPASSError (const std::string mess, const char *howbad) | |
Construct from a std::string with badness defined by keywords in a string. More... | |
MsPASSError (const std::string mess, const ErrorSeverity s=ErrorSeverity::Invalid) | |
MsPASSError (const char *mess, const ErrorSeverity s) | |
void | log_error () |
void | log_error (std::ostream &ofs) |
const char * | what () const noexcept |
ErrorSeverity | severity () const |
Public Attributes | |
std::stringstream | ss |
Additional Inherited Members | |
Protected Attributes inherited from mspass::utility::MsPASSError | |
std::string | message |
ErrorSeverity | badness |
Error thrown when get operators fail.
This is a convenience class used to construct a more informative set of errors when get operations fail.
|
inline |
Constructor called when a key is not found in the Metadata.
Texpected | is the type name (return of typeid name method) trying to extract. |
References mspass::utility::MsPASSError::badness, and mspass::utility::MsPASSError::message.
|
inline |
Constructor called when type requested does not match contents.
This implementation uses a pickle style map container where the contents of the map can by any type. We use boost::any to provide sanity checks on types. This is creates the error message thrown when the type of the return does not match the type requested.
References mspass::utility::MsPASSError::badness, and mspass::utility::MsPASSError::message.