Skip to content

Commit 4c61768

Browse files
committed
Use dummy error module
1 parent 29a6a4e commit 4c61768

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

lib/elixir/test/elixir/exception_test.exs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,10 @@ defmodule ExceptionTest do
5151
[error_info: %{module: __MODULE__, function: :dummy_error_extras}]}
5252
])
5353

54-
assert %ErlangError{
55-
original: {:failed_load_cacerts, :enoent},
56-
reason: ": Failed to load cacerts: operating system CA bundle could not be located"
57-
} =
54+
assert %ErlangError{original: {:failed_load_cacerts, :enoent}, reason: ": : this is chardata"} =
5855
Exception.normalize(:error, {:failed_load_cacerts, :enoent}, [
5956
{:pubkey_os_cacerts, :get, 0,
60-
[
61-
file: ~c"pubkey_os_cacerts.erl",
62-
line: 53,
63-
error_info: %{cause: :enoent, module: :pubkey_os_cacerts}
64-
]}
57+
[error_info: %{module: __MODULE__, function: :dummy_error_chardata}]}
6558
])
6659
end
6760

@@ -1079,4 +1072,8 @@ defmodule ExceptionTest do
10791072
end
10801073

10811074
def dummy_error_extras(_exception, _stacktrace), do: %{general: "foo"}
1075+
1076+
def dummy_error_chardata(_exception, _stacktrace) do
1077+
%{general: ~c"this is " ++ [~c"chardata"], reason: ~c"this " ++ [~c"too"]}
1078+
end
10821079
end

0 commit comments

Comments
 (0)