-
Notifications
You must be signed in to change notification settings - Fork 121
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
Exit better than throw #71
Exit better than throw #71
Conversation
catch | ||
_:Error -> | ||
lager:error("Error here: ~p~n" | ||
" Arguments: ~p~n" | ||
" Stack: ~p", [Error, WithThis, erlang:get_stacktrace()]), | ||
{error, Error} | ||
end. | ||
|
||
good2(WithThis) -> |
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.
According to Xref:
loud_errors:good2/1
calls undefined functionsomething:that/3
throw({error, Error}) | ||
end. | ||
|
||
good1(WithThis) -> |
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.
According to Xref:
loud_errors:good1/1
calls undefined functionlager:error/2
|
||
bad(WithThis) -> | ||
bad1(WithThis) -> |
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.
According to Xref:
loud_errors:bad1/1
calls undefined functionsomething:that/3
try | ||
something:that(may, fail, WithThis) | ||
catch | ||
_:Error -> | ||
{error, Error} | ||
end. | ||
|
||
good(WithThis) -> | ||
bad2(WithThis) -> |
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.
According to Xref:
loud_errors:bad2/1
calls undefined functionsomething:that/3
throw({error, Error}) | ||
end. | ||
|
||
good1(WithThis) -> |
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.
According to Xref:
loud_errors:good1/1
calls undefined functionsomething:that/3
I propose this as I plan to replace several Feel feel to close straight away if you feed exit not to be good enough. |
Depends on PR #70.
Before merging this PR, go over this checklist: