Skip to content
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

Write rebar3.crashdump on errors #1080

Merged
merged 2 commits into from
Jun 11, 2016
Merged

Write rebar3.crashdump on errors #1080

merged 2 commits into from
Jun 11, 2016

Conversation

Licenser
Copy link
Contributor

No description provided.

@ferd
Copy link
Collaborator

ferd commented Feb 26, 2016

I do prefer the DEBUG=1 for contextual output, though.

@Licenser
Copy link
Contributor Author

this does not change the behavior of DEBUG=1 or the error message, it simply adds a rebar3.crashdump to the cases where a DEBUG=1 message was formerly printed.

@@ -265,7 +265,8 @@ handle_error({error, rebar_abort}) ->
handle_error({error, {Module, Reason}}) ->
case code:which(Module) of
non_existing ->
?ERROR("Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace", []),
file:write_file("rebar3.crashdump", io_lib:fwrite("~p: ~p~n~p~n~n", [Module, Reason, erlang:get_stacktrace()])),
?ERROR("Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace rebar3.crashdump", []),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error line is not an actual sentence?

@ferd
Copy link
Collaborator

ferd commented Feb 26, 2016

WOuld that also drop files over the filesystem when run in API mode? I don't really like that.

@Licenser
Copy link
Contributor Author

Updated it so the sentences are nicer and it will recognize api mode and not write a crash file

@ferd
Copy link
Collaborator

ferd commented May 20, 2016

+1 on this. Does not sound like a bad idea.

@ferd ferd merged commit 979bb18 into erlang:master Jun 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants