Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
varsill committed Jun 10, 2024
1 parent 38ae233 commit 04019a2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/membrane/core/callback_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ defmodule Membrane.Core.CallbackHandler do
Error handling actions returned by callback #{inspect(state.module)}.#{callback}
""")

log_error_orginal_error(actions, e, __STACKTRACE__)
log_error_orginal_error(e, __STACKTRACE__)

reraise e, __STACKTRACE__
end
Expand All @@ -201,7 +201,7 @@ defmodule Membrane.Core.CallbackHandler do
Action: #{inspect(action, pretty: true)}
""")

log_error_orginal_error(action, e, __STACKTRACE__)
log_error_orginal_error(e, __STACKTRACE__)

reraise e, __STACKTRACE__
end
Expand All @@ -213,11 +213,7 @@ defmodule Membrane.Core.CallbackHandler do
# We log it, because sometimes, for some reason, crashing process doesn't cause
# printing error logs on stderr, so this debug log allows us to get some info
# about what happened in case of process crash
defp log_error_orginal_error(action_or_actions, error, stacktrace) do
action_or_actions =
if(is_list(action_or_actions), do: "actions ", else: "action ") <>
inspect(action_or_actions, limit: :infinity)

defp log_error_orginal_error(error, stacktrace) do
Membrane.Logger.error("""
#{inspect(error, pretty: true, limit: :infinity)}
#{Exception.format_stacktrace(stacktrace)}
Expand Down

0 comments on commit 04019a2

Please sign in to comment.