Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

Unreleased libtmux_erlang has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-erlang latest

tmux_scope:run_or_error/2

Run work and cleanup with run/2, returning the callback value directly. Raises {scope_cleanup_failed, Failure} if cleanup fails, retaining both outcomes in failure/0. With successful cleanup, callback exceptions retain their original reason and stack. Nested raising scopes propagate an inner failure through the outer scope while still attempting outer cleanup.

Source and package
Qualified name
tmux_scope:run_or_error/2
Declared in
tmux_scope
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_scope.erl
run_or_error(Function, Cleanup) -spec run_or_error(fun(() -> Value), fun(() -> ok | {error, term()})) -> Value.
Parameters

Guides#

Pages that discuss run_or_error/2.

Esc

Type to search.

Reference previewOpen reference