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
Avoid failing on source-file parsing errors #42
Conversation
Fixes #299. I'm not certain this is desirable, but...
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
I like the idea of printing a more informative message, explaining that there was a parsing error, and printing the name of the source file that had the parsing error. I'm not sure I like the idea of completely suppressing the error. What if, after printing the informative message, you rethrow the error? |
I'd wondered the same thing. I'd be happy to change it if that's your preference. |
Hmmm. Let's see what Jameson and Max think. |
Out of curiosity, is there a way for us to figure out what line the parsing error happened on? That would make it even easier for users to debug. |
Pull Request Test Coverage Report for Build 78
💛 - Coveralls |
Pull Request Test Coverage Report for Build 77
💛 - Coveralls |
amend_coverage_from_src!(fc) | ||
catch err | ||
@error "coverage could not incorporate source file $filename, it may have a parsing error" exception=(err,catch_backtrace()) | ||
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.
end | |
rethrow() | |
end |
Codecov Report
@@ Coverage Diff @@
## master #42 +/- ##
==========================================
- Coverage 96.41% 96.00% -0.42%
==========================================
Files 4 4
Lines 223 225 +2
==========================================
+ Hits 215 216 +1
- Misses 8 9 +1
Continue to review full report at Codecov.
|
|
I prefer #43 |
Fixes https://github.com/JuliaCI/Coverage.jl/issues/299. I'm not certain this is desirable, but...