mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
Internal Error Reporting

These functions are meant to be used by mxlib itself. You should use the non-internal versions, which don't start with mxlib_, in most other cases.

Namespaces

namespace  mx::internal
 Namespace for the internal error reporting functions.
 

Functions

template<class verboseT >
std::string mx::internal::mxlib_error_message (const error_t &code, const std::string &expl, const std::source_location &loc=std::source_location::current())
 Format a report given an mxlib error_t code and explanation.
 
template<>
std::string mx::internal::mxlib_error_message< verbose::o > (const error_t &code, const std::string &expl, const std::source_location &loc)
 Specialization of mxlib_error_message for verbose::o.
 
template<>
std::string mx::internal::mxlib_error_message< verbose::v > (const error_t &code, const std::string &expl, const std::source_location &loc)
 Specialization of mxlib_error_message for verbose::v.
 
template<>
std::string mx::internal::mxlib_error_message< verbose::vv > (const error_t &code, const std::string &expl, const std::source_location &loc)
 Specialization of mxlib_error_message for verbose::vv.
 
template<>
std::string mx::internal::mxlib_error_message< verbose::vvv > (const error_t &code, const std::string &expl, const std::source_location &loc)
 Specialization of mxlib_error_message for verbose::vvv.
 
template<class verboseT >
std::string mx::internal::mxlib_error_message (const error_t &code, const std::source_location &loc=std::source_location::current())
 Format a report given an mxlib error_t code.
 
template<>
std::string mx::internal::mxlib_error_message< verbose::o > (const error_t &code, const std::source_location &loc)
 Specialization of mxlib_error_message for verbose::o.
 
template<>
std::string mx::internal::mxlib_error_message< verbose::v > (const error_t &code, const std::source_location &loc)
 Specialization of mxlib_error_message for verbose::v.
 
template<>
std::string mx::internal::mxlib_error_message< verbose::vv > (const error_t &code, const std::source_location &loc)
 Specialization of mxlib_error_message for verbose::vv.
 
template<>
std::string mx::internal::mxlib_error_message< verbose::vvv > (const error_t &code, const std::source_location &loc)
 Specialization of mxlib_error_message for verbose::vvv.
 
template<class verboseT >
error_t mx::internal::mxlib_error_report (const error_t &code, const std::string &expl, const std::source_location &loc=std::source_location::current())
 Print a report to stderr given an mxlib error_t code and explanation and return the code.
 
template<>
error_t mx::internal::mxlib_error_report< verbose::o > (const error_t &code, const std::string &expl, const std::source_location &loc)
 Specialization of mxlib_error_report for verbose::o.
 
template<class verboseT >
error_t mx::internal::mxlib_error_report (const error_t &code, const std::source_location &loc=std::source_location::current())
 Print a report to stderr given an mxlib error_t code and return the code.
 
template<>
error_t mx::internal::mxlib_error_report< verbose::o > (const error_t &code, const std::source_location &loc)
 Specialization of mxlib_error_report for verbose::o.
 

Function Documentation

◆ mxlib_error_message() [1/2]

template<class verboseT >
std::string mx::internal::mxlib_error_message ( const error_t code,
const std::source_location &  loc = std::source_location::current() 
)

Format a report given an mxlib error_t code.

What is included depends on the verbosity level set by the template parameter This is for internal mxlib use, it includes mxlib in the vvv report.

Template Parameters
verboseTsets the verbosity level based on its level member.
Returns
the formatted message
Parameters
[in]codeis an mx::error_t error code
[in]loc[optional] source location

◆ mxlib_error_message() [2/2]

template<class verboseT >
std::string mx::internal::mxlib_error_message ( const error_t code,
const std::string &  expl,
const std::source_location &  loc = std::source_location::current() 
)

Format a report given an mxlib error_t code and explanation.

What is included depends on the verbosity level set by the template parameter This is for internal mxlib use, it includes mxlib in the vvv report.

Template Parameters
verboseTsets the verbosity level based on its level member.
Returns
the formatted message
Parameters
[in]codeis an mx::error_t error code
[in]expl[optional] if more information can be provided, use this to inform the user.
[in]loc[optional] source location

◆ mxlib_error_message< verbose::o >() [1/2]

template<>
std::string mx::internal::mxlib_error_message< verbose::o > ( const error_t code,
const std::source_location &  loc 
)

Specialization of mxlib_error_message for verbose::o.

Definition at line 555 of file mxError.cpp.

◆ mxlib_error_message< verbose::o >() [2/2]

template<>
std::string mx::internal::mxlib_error_message< verbose::o > ( const error_t code,
const std::string &  expl,
const std::source_location &  loc 
)

Specialization of mxlib_error_message for verbose::o.

Definition at line 509 of file mxError.cpp.

◆ mxlib_error_message< verbose::v >() [1/2]

template<>
std::string mx::internal::mxlib_error_message< verbose::v > ( const error_t code,
const std::source_location &  loc 
)

Specialization of mxlib_error_message for verbose::v.

Definition at line 561 of file mxError.cpp.

References mx::errorName().

◆ mxlib_error_message< verbose::v >() [2/2]

template<>
std::string mx::internal::mxlib_error_message< verbose::v > ( const error_t code,
const std::string &  expl,
const std::source_location &  loc 
)

Specialization of mxlib_error_message for verbose::v.

Definition at line 517 of file mxError.cpp.

References mx::errorName().

Referenced by mx::error_message< verbose::v >(), and mx::error_message< verbose::v >().

◆ mxlib_error_message< verbose::vv >() [1/2]

template<>
std::string mx::internal::mxlib_error_message< verbose::vv > ( const error_t code,
const std::source_location &  loc 
)

Specialization of mxlib_error_message for verbose::vv.

Definition at line 567 of file mxError.cpp.

References mx::errorMessage(), and mx::errorName().

◆ mxlib_error_message< verbose::vv >() [2/2]

template<>
std::string mx::internal::mxlib_error_message< verbose::vv > ( const error_t code,
const std::string &  expl,
const std::source_location &  loc 
)

Specialization of mxlib_error_message for verbose::vv.

Definition at line 525 of file mxError.cpp.

References mx::errorMessage(), and mx::errorName().

Referenced by mx::error_message< verbose::vv >(), and mx::error_message< verbose::vv >().

◆ mxlib_error_message< verbose::vvv >() [1/2]

template<>
std::string mx::internal::mxlib_error_message< verbose::vvv > ( const error_t code,
const std::source_location &  loc 
)

Specialization of mxlib_error_message for verbose::vvv.

Definition at line 573 of file mxError.cpp.

References mx::errorMessage(), and mx::errorName().

◆ mxlib_error_message< verbose::vvv >() [2/2]

template<>
std::string mx::internal::mxlib_error_message< verbose::vvv > ( const error_t code,
const std::string &  expl,
const std::source_location &  loc 
)

Specialization of mxlib_error_message for verbose::vvv.

Definition at line 537 of file mxError.cpp.

References mx::errorMessage(), and mx::errorName().

◆ mxlib_error_report() [1/2]

template<class verboseT >
error_t mx::internal::mxlib_error_report ( const error_t code,
const std::source_location &  loc = std::source_location::current() 
)

Print a report to stderr given an mxlib error_t code and return the code.

What is printed depends on the verbosity level set by the template parameter This is for internal mxlib use, it includes mxlib in the vvv report.

Template Parameters
verboseTsets the verbosity level based on its level member.
Returns
the provided error_t code
Parameters
[in]codeis an mx::error_t error code
[in]loc[optional] source location

Definition at line 271 of file mxError.hpp.

◆ mxlib_error_report() [2/2]

template<class verboseT >
error_t mx::internal::mxlib_error_report ( const error_t code,
const std::string &  expl,
const std::source_location &  loc = std::source_location::current() 
)

Print a report to stderr given an mxlib error_t code and explanation and return the code.

What is printed depends on the verbosity level set by the template parameter This is for internal mxlib use, it includes mxlib in the vvv report.

Template Parameters
verboseTsets the verbosity level based on its level member.
Returns
the provided error_t code
Parameters
[in]codeis an mx::error_t error code
[in]expl[optional] if more information can be provided, use this to inform the user.
[in]loc[optional] source location

Definition at line 239 of file mxError.hpp.

◆ mxlib_error_report< verbose::o >() [1/2]

template<>
error_t mx::internal::mxlib_error_report< verbose::o > ( const error_t code,
const std::source_location &  loc 
)

Specialization of mxlib_error_report for verbose::o.

Definition at line 596 of file mxError.cpp.

◆ mxlib_error_report< verbose::o >() [2/2]

template<>
error_t mx::internal::mxlib_error_report< verbose::o > ( const error_t code,
const std::string &  expl,
const std::source_location &  loc 
)

Specialization of mxlib_error_report for verbose::o.

Definition at line 588 of file mxError.cpp.