Repository navigation
Throw IOException from writeHTML() when the file cannot be written - #100
Merged
Merged
Conversation
writeHTML() throws ParseException instead of IOException when the file cannot be written
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #100 +/- ##
=========================================
Coverage 90.55% 90.55%
Complexity 1425 1425
=========================================
Files 25 25
Lines 3166 3166
=========================================
Hits 2867 2867
Misses 299 299 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
writeHTML() installed ParseException's error handler where the other writers install IOException's. testFailWriteHTML() called writeXML(), so the failure path went untested; it now calls writeHTML(). Fixes #92 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gravitypdf-bot
force-pushed
the
fix/issue-92
branch
from
October 25, 2026 23:41
65e06f4 to
c05cdac
Compare
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.
Fixes #92
writeHTML()installedParseException's error handler, so a failed write threwParseExceptionrather thanIOExceptionaswriteXML()andwriteHTML5()do.IOExceptionextendsParseException, so existingcatch (ParseException $e)blocks still catch it.Tests:
testFailWriteHTML()calledwriteXML(), sowriteHTML()'s failure path was untested. It now callswriteHTML()and fails onmain. I also removed the rethrow-onlytry/catchwrappers from it and fromtestFailWriteXML()andtestFailWriteXHTML(), sinceexpectException()already does that job.This and #95 both change the line in
writeHTML()that installs the error handler, so whichever merges second needs a one-line rebase.🤖 Generated with Claude Code