-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle Task/GenServer exits correctly in Google formatter
We were running into a situation where errors caused by GenServers terminating were not being formatted because they were a slightly different shape to what was expected in the formatter. This updates the formatter to handle them.
- Loading branch information
1 parent
5ad0dee
commit 25d719c
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
defmodule CrashingGenServer do | ||
use GenServer | ||
|
||
def start_link(_) do | ||
GenServer.start_link(__MODULE__, :ok, name: __MODULE__) | ||
end | ||
|
||
def init(state) do | ||
{:ok, state} | ||
end | ||
|
||
def handle_call(:boom, _, _) do | ||
raise "boom" | ||
end | ||
end |