diff --git a/lib/honeydew/job_runner.ex b/lib/honeydew/job_runner.ex index 3a8f9f9..5f6e48a 100644 --- a/lib/honeydew/job_runner.ex +++ b/lib/honeydew/job_runner.ex @@ -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}) diff --git a/lib/honeydew/worker.ex b/lib/honeydew/worker.ex index 3943d32..fa6ac41 100644 --- a/lib/honeydew/worker.ex +++ b/lib/honeydew/worker.ex @@ -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