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

Macros controlling how mxlib reports errors

mxlib components use these macros to report errors to the user, which by default are wrappers for mx::error_report and mx::errno_report. This behavior can be changed with preprocessor defines.

To completely suppress all mxlib error reporting, include the following before includng any mxlib headers

#define MX_NO_ERROR_REPORTS

Macros

#define mxError(esrc, ecode, expl)    std::cerr << "\n" << mx::error_report( esrc, ecode, __FILE__, __LINE__, expl ) << "\n";
 This reports an mxlib specific error.
 

Macro Definition Documentation

◆ mxError

#define mxError (   esrc,
  ecode,
  expl 
)     std::cerr << "\n" << mx::error_report( esrc, ecode, __FILE__, __LINE__, expl ) << "\n";

This reports an mxlib specific error.

Can be predefined to change the error reporting of mxlib.

Parameters
[in]esrcis intended to identify the component (i.e. the class name)
[in]ecodeis an errno erro code
[in]expl[optional] if more information can be provided, use this to inform the user.

Definition at line 72 of file mxErrorOld.hpp.