zest v0.1.2 Zest View Source
Link to this section Summary
Functions
Iterates over a collections, calling the provided effectful function with each item.
Iterates over two collections, calling the provided effectful function with each pair of items
You take on the role of the apply
function in this exciting
function that wraps execution of a function such that your function
is responsible for calling it.
Add some debug information to the context for the duration of a
function's execution. If a raise
, throw
or exit
occurs, the
context will be pretty printed to the screen to aid with debugging.
Catches errors and exceptions, invoking an interceptor function
An interceptor function which simply rethrows/reraises/re-exits
Wraps an interceptor or nullary function into an interceptor function such that after the execution of the provided function, the error or exception will be rethrown.
Add some debug information to the context for the duration of a
block or expression. If a raise
, throw
or exit
occurs, the
context will be pretty printed to the screen to aid with debugging.
Wrap a function such that it is as if its body was wrapped in scope/2
Link to this section Types
interceptor()
View Sourceinterceptor() :: (intercept_type(), error :: term(), maybe_stacktrace :: term() -> term())
Link to this section Functions
Iterates over a collections, calling the provided effectful function with each item.
Iterates over two collections, calling the provided effectful function with each pair of items
You take on the role of the apply
function in this exciting
function that wraps execution of a function such that your function
is responsible for calling it.
Add some debug information to the context for the duration of a
function's execution. If a raise
, throw
or exit
occurs, the
context will be pretty printed to the screen to aid with debugging.
intercept(fun, interceptor)
View Sourceintercept(function(), interceptor()) :: function()
Catches errors and exceptions, invoking an interceptor function
rethrow(atom, e, stacktrace)
View Sourcerethrow(intercept_type(), error :: term(), maybe_stacktrace :: term()) :: none()
An interceptor function which simply rethrows/reraises/re-exits
Wraps an interceptor or nullary function into an interceptor function such that after the execution of the provided function, the error or exception will be rethrown.
Add some debug information to the context for the duration of a
block or expression. If a raise
, throw
or exit
occurs, the
context will be pretty printed to the screen to aid with debugging.
Examples:
scope [foo: :bar[, assert(true == false)
scope [foo: :bar] do assert true == false end
Wrap a function such that it is as if its body was wrapped in scope/2