NewPipeExtractor icon indicating copy to clipboard operation
NewPipeExtractor copied to clipboard

Make ``ParsingException`` a ``RuntimeException``

Open litetex opened this issue 5 months ago • 2 comments

Currently ParsingException is a normal checked Exception that needs to be explicitly declared everywhere, where it might be thrown or used.

This is kind of problematic when working with Java's streaming API or other reactive patterns because you can't use checked exceptions there.

Therefore it would be a lot better to make ParsingException extend RuntimeException instead.

litetex avatar Jul 10 '25 21:07 litetex

I agree with this. Considering that regex exceptions are also runtime exceptions (and we often throw ParsingException in regex scenarios), it falls into the same category

absurdlylongusername avatar Jul 11 '25 00:07 absurdlylongusername

Mmmh but then you would lose Java's requirement/guarantee to put throws ... annotations on methods, and we would therefore be more likely to forget that a method is fallible, because RuntimeExceptions do not need to be specified. However Kotlin removed this requirement anyway, so I agree with this.

Stypox avatar Jul 14 '25 20:07 Stypox