ocean.core.Enforce

Exception utilities to write enforcements/

Members

Functions

enforce
void enforce(T ok, istring msg)

Thin wrapper for enforceImpl that deduces file/line as template arguments to avoid ambiguity between overloads.

enforce
void enforce(E e, T ok, istring msg)

Thin wrapper for enforceImpl that deduces file/line as template arguments to avoid ambiguity between overloads.

enforce
void enforce(T1 a, T2 b)

Thin wrapper for enforceImpl that deduces file/line as template arguments to avoid ambiguity between overloads.

enforce
void enforce(E e, T1 a, T2 b)

Thin wrapper for enforceImpl that deduces file/line as template arguments to avoid ambiguity between overloads.

enforceImpl
void enforceImpl(T ok, istring msg, istring file, int line)

Enforces that given expression evaluates to boolean true after implicit conversion.

enforceImpl
void enforceImpl(Exception e, T ok, istring msg, istring file, int line)

Enforces that given expression evaluates to boolean true after implicit conversion.

enforceImpl
void enforceImpl(T1 a, T2 b, istring file, int line)

enforcement that builds error message string automatically based on value of operands and supplied "comparison" operation.

enforceImpl
void enforceImpl(Exception e, T1 a, T2 b, istring file, int line)

ditto

throwChained
void throwChained(Throwable e, istring msg, istring file, int line)

Throws a new exception E chained together with an existing exception.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).