Skip to content

Commit

Permalink
fixing __STACKTRACE__ warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
koudelka committed May 17, 2021
1 parent 80744e5 commit 8c500b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/honeydew/job_runner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ defmodule Honeydew.JobRunner do
end
{:ok, result}
rescue e ->
{:error, Crash.new(:exception, e, System.stacktrace())}
{:error, Crash.new(:exception, e, __STACKTRACE__)}
catch
:exit, reason ->
# catch exit signals and shut down in an orderly manner
{:error, Crash.new(:exit, reason)}
e ->
{:error, Crash.new(:throw, e, System.stacktrace())}
{:error, Crash.new(:throw, e, __STACKTRACE__)}
end

:ok = Worker.job_finished(worker, %{job | result: result})
Expand Down
4 changes: 2 additions & 2 deletions lib/honeydew/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ defmodule Honeydew.Worker do
%{state | ready: false}
end
rescue e ->
HoneydewLogger.worker_init_crashed(module, Crash.new(:exception, e, System.stacktrace()))
HoneydewLogger.worker_init_crashed(module, Crash.new(:exception, e, __STACKTRACE__))
%{state | ready: false}
catch
:exit, reason ->
HoneydewLogger.worker_init_crashed(module, Crash.new(:exit, reason))
%{state | ready: false}
e ->
HoneydewLogger.worker_init_crashed(module, Crash.new(:throw, e, System.stacktrace()))
HoneydewLogger.worker_init_crashed(module, Crash.new(:throw, e, __STACKTRACE__))
%{state | ready: false}
end
|> send_ready_or_callback
Expand Down

0 comments on commit 8c500b8

Please sign in to comment.