mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
How mxlib handles errors
Modules | |
Error Handling Macros | |
Exceptions | |
Error Handling Files | |
mxlib Error Codes | |
Functions | |
std::string | mx::MXE_CodeToName (int ec) |
Return the name for an mxlib error code. More... | |
std::string | mx::MXE_CodeToDescription (int ec) |
Return the description for an mxlib error code. More... | |
std::string | mx::errno_CodeToName (int ec) |
Return the macro name and a message for a standard errno code. More... | |
std::string | mx::error_report (const std::string &source, const int &code, const std::string &file, const int &line, const std::string &expl="") |
Construct a rich error report given an mxlib error code. More... | |
std::string | mx::errno_report (const std::string &source, int ec, const std::string &file, const int &line, const std::string &expl="") |
Construct a rich error report given a standard errno error code. More... | |
std::string mx::errno_CodeToName | ( | int | ec | ) |
Return the macro name and a message for a standard errno code.
[in] | ec | the error code |
Definition at line 132 of file mxError.cpp.
Referenced by mx::err::mxException::build_what(), and mx::errno_report().
std::string mx::errno_report | ( | const std::string & | source, |
int | ec, | ||
const std::string & | file, | ||
const int & | line, | ||
const std::string & | expl = "" |
||
) |
Construct a rich error report given a standard errno error code.
[in] | source | intended to identify the component (i.e. the class name) |
[in] | ec | an errno erro code |
[in] | file | file should be passed the __FILE__ macro |
[in] | line | line should be passed the __LINE__ macro |
[in] | expl | [optional] if more information can be provided, use this to inform the user. |
Definition at line 486 of file mxError.cpp.
References mx::errno_CodeToName().
std::string mx::error_report | ( | const std::string & | source, |
const int & | code, | ||
const std::string & | file, | ||
const int & | line, | ||
const std::string & | expl = "" |
||
) |
Construct a rich error report given an mxlib error code.
[in] | source | is intended to identify the mxlib component (i.e. the class name) |
[in] | code | is an MXE_* error code |
[in] | file | should be passed the __FILE__ macro |
[in] | line | should be passed the __LINE__ macro |
[in] | expl | [optional] if more information can be provided, use this to inform the user. |
Definition at line 458 of file mxError.cpp.
References mx::MXE_CodeToDescription(), and mx::MXE_CodeToName().
std::string mx::MXE_CodeToDescription | ( | int | ec | ) |
Return the description for an mxlib error code.
[in] | ec | the error code |
Definition at line 82 of file mxError.cpp.
Referenced by mx::error_report().
std::string mx::MXE_CodeToName | ( | int | ec | ) |
Return the name for an mxlib error code.
[in] | ec | the error code |
Definition at line 32 of file mxError.cpp.
Referenced by mx::error_report().