Fwd: OT perhaps (better directed to Oracle?): Suggestions for improving checked exceptions in Java.

2021-10-29 Thread Owen Thomas
If checked exceptions could be selectively suppressed like this, then perhaps I could override Object.equals() with a throws clause that threw any exception I chose. Developers of libraries that were dependent on mine could "ignore" this if that's what they wanted. Thinking about it now, I can't s

Re: OT perhaps (better directed to Oracle?): Suggestions for improving checked exceptions in Java.

2021-10-29 Thread Owen Thomas
Although I do it often enough, I'm not a fan of wrapping a checked exception in a RuntimeException or even another checked exception like IOException. I think this solution is ugly, bug prone, and can be avoided through what I believe are relatively minor and unobtrusive enhancements given in my su