Skip to main content

oa_validate

Macro oa_validate 

Source
macro_rules! oa_validate {
    ($cond:expr, $sev:expr, $comp:expr, $($arg:tt)*) => { ... };
}
Expand description

Validate a condition and report via the OA validation layer.

In debug builds the check is always active. In release builds the check compiles out unless the oa-enable-validation feature is set.

ⓘ
// In a function returning oa::Result<T>:
oa_validate!(m > 0, oa::ValidationSeverity::Error, "Core", "M must be > 0, got {m}");
  • Error / Fatal → logs and returns Err(...) from the enclosing function.
  • Warning / Info / Verbose → logs only; does not return.

Port provenance: OA_VALIDATE macro in oa/core/validation.h.