Skip to content

fix(svg): gradient number errors read in the reader's house style#185

Merged
DemchaAV merged 2 commits into
developfrom
fix/svg-gradient-error-context
Jun 13, 2026
Merged

fix(svg): gradient number errors read in the reader's house style#185
DemchaAV merged 2 commits into
developfrom
fix/svg-gradient-error-context

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Follow-up to the SVG reader error-context work, applied to the gradients path (from #179, already on develop).

SvgGradients coordinate / radius / stop parsing now goes through one number(value, what) helper that throws <field> must be a number, got '<value>' with the cause chained — instead of leaking the raw JDK NumberFormatException ("For input string: …"). The reader's per-element wrapper already names the referencing element, so a bad <linearGradient x1="abc"> now reads in <path …>: gradient coordinate must be a number, got 'abc'.

  • 6 parse sites routed through the helper (coordinate, radius, stop value).
  • Negative test malformedGradientNumberSaysWhatExpectedANumber.
  • CHANGELOG entry under v1.8.0 → Bug fixes.

Full suite green (1324).

DemchaAV added 2 commits June 13, 2026 14:27
SvgGradients coordinate/radius/stop parsing now goes through one number()
helper that throws '<field> must be a number, got <value>' with the cause
chained, matching the rest of the beta SVG reader instead of leaking the
raw JDK NumberFormatException. Adds a negative test + CHANGELOG entry.
@DemchaAV DemchaAV merged commit a5b7c25 into develop Jun 13, 2026
11 checks passed
@DemchaAV DemchaAV deleted the fix/svg-gradient-error-context branch June 13, 2026 13:55
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.

1 participant