Skip to content

Commit

Permalink
automatic handling
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Aug 23, 2024
1 parent 390ffb3 commit de8276a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/tower/ephemeral_reporter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ 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()
iex> event.kind
:error
iex> event.reason
%ArithmeticError{message: "bad argument in arithmetic expression"}
iex> Tower.detach()
:ok
iex> Tower.EphemeralReporter.stop(pid)
:ok
"""
Expand Down

0 comments on commit de8276a

Please sign in to comment.