CandleClock.ErrorLogger.in_catch-question-mark

You're seeing just the function in_catch-question-mark, go back to CandleClock.ErrorLogger module for more information.

Specs

in_catch?(Macro.Env.t()) :: boolean()

Returns if the environment is within a catch or rescue clause.

Use it like this in a macro:

defmacro maybe_get_stacktrace() do
  if in_catch?(__CALLER__) do
    quote do __STACKTRACE__ end
  else
    quote do [] end
  end
end