Define MORPHEUS_EXPECTS

MORPHEUS_EXPECTS(cond, reason)

Macro for checking (pre-)conditions that throws an exception when a condition is violated.

Example usage:

Copy
Copied!
            

MORPHEUS_EXPECTS(lhs->dtype == rhs->dtype, "Column type mismatch");

Parameters
  • cond[in] Expression that evaluates to true or false

  • reason[in] String literal description of the reason that cond is expected to be true

Throws morpheus::LogicError

if the condition evaluates to false.

Previous Define MORPHEUS_CONCAT_STR
Next Define MORPHEUS_FAIL
© Copyright 2023, NVIDIA. Last updated on Feb 2, 2024.