Croma.DebugAssert (croma v0.11.1) View Source
Link to this section Summary
Functions
Ensures that the given expression evaluates to some truthy value at runtime and raises otherwise.
Link to this section Functions
Ensures that the given expression evaluates to some truthy value at runtime and raises otherwise.
This is intended to be used as debugging purposes: crash immediately when any logic error is found,
similar to assert()
in C.
However note that, unlike C, crash of the currently running process does not necessarily stop execution of the program.
Runtime checks by debug_assert/2
can be disabled by setting application config during compilation.
config :croma, [
debug_assert: false
]
The passed expression should be side effect free in order to preserve code semantics when disabled.