New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle :undefined in Exception.format_arity/1 #3288
Conversation
Thanks to @fishcakez for helping diagnose this. |
Should fix this in |
Sure, I'll push fixes tomorrow. |
@fishcakez what is your argument for catching |
I don't think it makes sense to handle |
Sorry, I don't really understand how to best implement a custom |
The custom one can call defp format_mfa(mod, fun, :undefined), do: [inspect(mod), ?. | inspect(fun)]
defp format_mfa(mod, fun, args), do: Exception.format_mfa(mod, fun, args) |
We get :undefined when a temporary worker of a simple_one_for_one supervisor crashes. Thanks to @fishcakez for feedback
Pushed updated implementation and added a test case. |
defp format_arity(:undefined) do | ||
"/?" | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alco perfect except you forgot to remove this, otherwise 👍.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads-up.
Handle :undefined in Exception.format_arity/1
We get :undefined when a temporary worker of a simple_one_for_one supervisor crashes.
This PR fixes the following error.
To reproduce the error, create a new application with
mix new --sup arity
, add the following code to it:And configure
:logger
as follows:Finally, run