Stifle
Stifle is a library for suppressing side-effects (exits, raises, throws) in Elixir functions, allowing the developer to replay side effects in the current process or inspect the effect/return value safely.
Example
iex> raise_hell_fn = fn -> raise "hell" end
iex> stifled_fn = Stifle.stifle(raise_hell_fn)
iex> stifled_return_value = stifled_fn.() # => {:error, %RuntimeError{message: "hell"}, [...]}
iex> Stifle.unstifle(stifled_return_value)
** (RuntimeError) hellFull Documentation
Full documentation is available on hexdocs.pm.
Authorship and License
Stifle is copyright 2016 Appcues, Inc.
Stifle is released under the MIT License.