iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
macros.hpp File Reference

Go to the source code of this file.

Macros

#define IOX2_REPORT(error, kind)
 report error of some non-fatal kind
 
#define IOX2_REPORT_FATAL(error)
 report fatal error
 
#define IOX2_REPORT_IF(condition, error, kind)
 report error of some non-fatal kind if expr evaluates to true
 
#define IOX2_REPORT_FATAL_IF(condition, error)
 report fatal error if expr evaluates to true
 

Macro Definition Documentation

◆ IOX2_REPORT

#define IOX2_REPORT (   error,
  kind 
)
Value:
HoofsErrorType toError(HoofsError code)
void forwardNonFatalError(Error &&error, Kind &&kind, const bb::detail::SourceLocation &location, const char *stringifiedCondition)
Forwards a non-fatal error.
static constexpr auto current(const char *file=__builtin_FILE(), const uint32_t line=__builtin_LINE(), const char *function=__builtin_FUNCTION()) noexcept -> SourceLocation

report error of some non-fatal kind

Parameters
errorerror object (or code)
kindkind of error, must be non-fatal

Definition at line 40 of file macros.hpp.

◆ IOX2_REPORT_FATAL

#define IOX2_REPORT_FATAL (   error)
Value:
constexpr FatalKind FATAL
void forwardFatalError(Error &&error, Kind &&kind, const bb::detail::SourceLocation &location, const char *stringifiedCondition)
Forwards a fatal error and does not return.

report fatal error

Parameters
errorerror object (or code)

Definition at line 46 of file macros.hpp.

◆ IOX2_REPORT_FATAL_IF

#define IOX2_REPORT_FATAL_IF (   condition,
  error 
)
Value:
if (condition) { \
iox2::legacy::er::forwardFatalError(iox2::legacy::er::toError(error), \
#condition); \
} \
[] { }()

report fatal error if expr evaluates to true

Parameters
conditionboolean expression
errorerror object (or code)

Definition at line 64 of file macros.hpp.

◆ IOX2_REPORT_IF

#define IOX2_REPORT_IF (   condition,
  error,
  kind 
)
Value:
if (condition) { \
iox2::legacy::er::forwardNonFatalError( \
} \
[] { }()

report error of some non-fatal kind if expr evaluates to true

Parameters
conditionboolean expression
errorerror object (or code)
kindkind of error, must be non-fatal

Definition at line 54 of file macros.hpp.