Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.15.1
-
None
Description
I find BrokenReader very helpful in tests of Reader exception handling, but at present, it can only be configured to throw IOException. In some cases, I also want to test the handling of runtime exceptions, usually to test that they're propagated rather than caught. To do this, I end up implementing a subclass of Reader.
It would be great if BrokenReader, and its close relatives BrokenInputStream, BrokenWriter, and BrokenOutputStream, could be configured to throw RuntimeExceptions in addition to IOExceptions.
I'll submit a PR for your consideration shortly.