Skip to content

Commit 94c60be

Browse files
Wrap non-exceptions
Co-authored-by: José Valim <[email protected]>
1 parent 6f47100 commit 94c60be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/sentry/logger_backend.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ defmodule Sentry.LoggerBackend do
108108
] ++ Map.to_list(sentry)
109109

110110
case meta[:crash_reason] do
111-
{exception, stacktrace} when is_list(stacktrace) ->
111+
{%_{__exception__: true} = exception, stacktrace} when is_list(stacktrace) ->
112112
Sentry.capture_exception(exception, [stacktrace: stacktrace] ++ opts)
113113

114-
reason when is_atom(reason) and not is_nil(reason) ->
115-
Sentry.capture_exception(reason, opts)
114+
{other, stacktrace} when is_list(stacktrace) ->
115+
Sentry.capture_exception(Sentry.CrashError.exception(other), [stacktrace: stacktrace] ++ opts)
116116

117117
_ ->
118118
if state.capture_log_messages do

0 commit comments

Comments
 (0)