Skip to content

Commit 433ff88

Browse files
committed
Allow custom fields in Exception.t typespec
1 parent c7081fd commit 433ff88

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/elixir/lib/exception.ex

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ defmodule Exception do
1515
"""
1616

1717
@typedoc "The exception type"
18-
@type t :: %{__struct__: module, __exception__: true}
18+
@type t :: %{
19+
required(:__struct__) => module,
20+
required(:__exception__) => true,
21+
atom => any
22+
}
1923

2024
@typedoc "The kind handled by formatting functions"
2125
@type kind :: :error | :exit | :throw | {:EXIT, pid}

0 commit comments

Comments
 (0)