Skip to content

Expose the full rejected input on parse errors without putting it in the message #44

Open

Description

@CaffeinatedCoder

Parse errors cut the rejected input to 64 characters (LiteralExcerpt), so a hostile megabyte literal doesn't become a megabyte exception message in every log. That's the right default, and it stays.

But a caller that wants the whole input, to log it somewhere bounded or to point at the offending character, can't get it. A dedicated exception type deriving from FormatException could carry the input and the position as properties, with the message still bounded.

Deriving from FormatException keeps every existing catch working, so this only adds.

Activity

  1. added this to the 9.1.0 milestone on Oct 17, 2026
  2. removed this from the 9.1.0 milestone on Oct 17, 2026
  3. CaffeinatedCoder commented on Oct 17, 2026

    @CaffeinatedCoder
    OwnerAuthor

    Moved off 9.1.0 into the backlog (#83), with no milestone.

    release/9.x has been cut, and 9.1.0 ships with the work that's already finished. Nothing has started on this issue, and it shouldn't hold up the tag. This is an addition, so the 10.0.0 epic (#58) doesn't take it either: that epic is kept to the silent and breaking fixes so they aren't held up behind new features.

    When someone picks it up, it goes under the epic of the release it will ship in and takes that milestone. A 9.x minor would need the change cherry-picked onto release/9.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/literalsParse, TryParse and formattingenhancementNew feature or requestpackage/coreAffects CodoMetis.ValueRanges

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions