Hi all, I've created a simple text parser class [1] as part of writing the 3D file format IO functionality for GEOMETRY-101. One of the primary goals of the class is to provide standardized and informative parse errors that include line and column numbers from the text input. (Nothing is worse than attempting to process a file and receiving a completely generic, unhelpful exception message.) That portion is working well. However, I'm wondering what exception type to use for these standardized parse errors. I'm currently using IllegalStateException since you can conceptualize the parser as a state machine. However, I feel like there is probably a better solution.
Any ideas? Regards, Matt J [1] https://github.com/darkma773r/commons-geometry/blob/stl-io-working/commons-geometry-examples/examples-io/src/main/java/org/apache/commons/geometry/examples/io/internal/SimpleTextParser.java