Introduce '--show-backtrace' to show backtrace on compile error#4652
Closed
makenowjust wants to merge 1 commit intocrystal-lang:masterfrom
Closed
Introduce '--show-backtrace' to show backtrace on compile error#4652makenowjust wants to merge 1 commit intocrystal-lang:masterfrom
makenowjust wants to merge 1 commit intocrystal-lang:masterfrom
Conversation
On compiler development, we want to see exception's backtrace sometime. This option is for it.
Sija
reviewed
Jul 1, 2017
| else | ||
| puts ex | ||
| if @show_backtrace | ||
| puts ex |
Contributor
There was a problem hiding this comment.
ex.inspect_with_backtrace(STDERR)?
Contributor
Author
There was a problem hiding this comment.
No. inspect_with_backtrace uses ex.message, but full error message of Crystal::Exception is built by to_s method. So if use inspect_with_backtrace, we can't see full error message.
Contributor
There was a problem hiding this comment.
Fair 'nuff, and what about printing errors into STDERR instead of STDOUT?
Member
|
On compiler errors you write a spec, it fails and then you see the backtrace. Plus on a released compiler the backtrace will not be accurate because of |
Contributor
Author
|
@asterite Yes. You are right. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On compiler development, we want to see exception's backtrace sometime. This option is for it.