1 #ifndef _MSPASS_ERROR_H_
2 #define _MSPASS_ERROR_H_
14 enum class ErrorSeverity
26 mspass::utility::ErrorSeverity string2severity(
const std::string howbad);
28 std::string severity2string(
const mspass::utility::ErrorSeverity es);
47 message=
"MsPASS library error\n";
62 std::string s(howbad);
75 MsPASSError(
const std::string mess,
const ErrorSeverity s=ErrorSeverity::Invalid)
90 std::cerr <<
message << std::endl;
Base class for error object thrown by MsPASS library routines.
Definition: MsPASSError.h:40
MsPASSError(const std::string mess, const ErrorSeverity s=ErrorSeverity::Invalid)
Definition: MsPASSError.h:75
MsPASSError()
Definition: MsPASSError.h:46
ErrorSeverity severity() const
Definition: MsPASSError.h:109
std::string message
Definition: MsPASSError.h:109
MsPASSError(const std::string mess, const char *howbad)
Construct from a std::string with badness defined by keywords in a string.
Definition: MsPASSError.h:60
void log_error(std::ostream &ofs)
Definition: MsPASSError.h:93
void log_error()
Definition: MsPASSError.h:89
const char * what() const noexcept
Definition: MsPASSError.h:107
MsPASSError(const char *mess, const ErrorSeverity s)
Definition: MsPASSError.h:82
ErrorSeverity badness
Definition: MsPASSError.h:116