Ex Contract v0.1.2 ExContract.Assert View Source

This module is not meant to be used directly by client code. This is an implementation module used by ExContract used for implementing checking of conditions in ExContract.requires/1, ExContract.ensures/1, ExContract.check/1, and ExContract.fail/1 macros.

Link to this section Summary

Link to this section Functions

Link to this function check(condition, condition_txt, env, msg) View Source
check(
  condition :: boolean(),
  condition_txt :: String.t(),
  env :: any(),
  msg :: String.t()
) :: nil | no_return()
Link to this function ensures(condition, condition_txt, env, msg) View Source
ensures(
  condition :: boolean(),
  condition_txt :: String.t(),
  env :: any(),
  msg :: String.t()
) :: nil | no_return()
Link to this function fail(env, msg) View Source
fail(env :: any(), msg :: String.t()) :: nil | no_return()
Link to this function requires(condition, condition_txt, env, msg) View Source
requires(
  condition :: boolean(),
  condition_txt :: String.t(),
  env :: any(),
  msg :: String.t()
) :: nil | no_return()