Skip to content

Commit

Permalink
Avoid failing on source-file parsing errors
Browse files Browse the repository at this point in the history
Fixes #299. I'm not certain this is desirable, but...
  • Loading branch information
timholy committed Nov 23, 2020
1 parent 47f880e commit 4e1152f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/CoverageTools.jl
Expand Up @@ -237,7 +237,11 @@ module CoverageTools
coverage = process_cov(filename, folder)
fc = FileCoverage(filename, read(filename, String), coverage)
if get(ENV, "DISABLE_AMEND_COVERAGE_FROM_SRC", "no") != "yes"
amend_coverage_from_src!(fc)
try
amend_coverage_from_src!(fc)
catch err
@error "coverage could not incorporate source file $filename, it may have a parsing error" exception=err
end
end
return fc
end
Expand Down

0 comments on commit 4e1152f

Please sign in to comment.