21069, "jeremiah-corrado", "Errors Module: 'DecodeError'and 'CodepointSplittingError'", "2022-11-21T17:31:50Z"
Background:
The DecodeError and CodepointSplittingError types both live in the Errors module and pertain to runtime errors with strings.
DecodeErroris thrown when attempting to construct astringusing non-utf8 charactersCodepointSplittingErroris thrown when attempting to slice a string along a byte-boundary that is not a codepoint boundary
Suggestions/Questions:
- Should these be moved somewhere else in the standard modules? (This was discussed in the module review, and it sounds like people are leaning against moving them).
- The other
Errorsubclasses in the Errors module feel pretty fundamental to the language, while these are specific to thestringtype - If they do move, where should they be located?
- The other
- Do we want to be more hierarchical and create a parent class for these? Maybe called
StringError? - Are the current names okay?