diff --git a/lib/tower/ephemeral_reporter.ex b/lib/tower/ephemeral_reporter.ex index c274a56..1da3094 100644 --- a/lib/tower/ephemeral_reporter.ex +++ b/lib/tower/ephemeral_reporter.ex @@ -9,13 +9,10 @@ defmodule Tower.EphemeralReporter do iex> {:ok, pid} = Tower.EphemeralReporter.start_link([]) iex> Tower.EphemeralReporter.events() [] - iex> try do - ...> 1 / 0 - ...> catch - ...> kind, reason -> - ...> Tower.handle_caught(kind, reason, __STACKTRACE__) - ...> end + iex> Application.put_env(:tower, :reporters, [Tower.EphemeralReporter]) + iex> Tower.attach() :ok + iex> spawn(fn -> 1 / 0 end) iex> Process.sleep(200) :ok iex> [event] = Tower.EphemeralReporter.events() @@ -23,6 +20,8 @@ defmodule Tower.EphemeralReporter do :error iex> event.reason %ArithmeticError{message: "bad argument in arithmetic expression"} + iex> Tower.detach() + :ok iex> Tower.EphemeralReporter.stop(pid) :ok """