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

Address #364: catch errors per-section #365

Merged
merged 4 commits into from
May 6, 2022

Conversation

cceckman
Copy link
Contributor

In #364, I accidentally produced a file that (apparently) has empty
section filenames, as understood by the extension. This lead to an
undefined property access (split) when trying to work with the file
name; that exception propagated all the way up the rendering stack,
resulting in no coverage being displayed.

With this change, if we encounter an error in checkSection, we just return
false - if it's an erroneous section, it doesn't apply to the current
file. (This is especially true if there is no section.file property!)

This way, we still show coverage wherever we can.

cceckman and others added 2 commits April 26, 2022 22:59
In ryanluker#364, I accidentally produced a file that (apparently) has empty
section filenames, as understood by the extension. This lead to an
undefined property access (`split`) when trying to work with the file
name; that exception propagated all the way up the rendering stack,
resulting in _no_ coverage being displayed.

With this change, if we encounter an error in `checkSection`, we just return
`false` - if it's an erroneous section, it doesn't apply to the current
file. (This is especially true if there is no `section.file` property!)

This way, we still show coverage wherever we can.
Copy link
Owner

@ryanluker ryanluker left a comment

Choose a reason for hiding this comment

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

One minor thing and then ready to merge!

@cceckman
Copy link
Contributor Author

cceckman commented May 6, 2022

Thanks for the comments - glad I wasn't too far off base!

@ryanluker ryanluker added this to the 2.10.0 milestone May 6, 2022
@ryanluker ryanluker merged commit 39ea7f9 into ryanluker:master May 6, 2022
@cceckman cceckman deleted the issue364 branch May 7, 2022 01:03
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