6 ms·
So you're saying checked exceptions are perfectly fine. I'll write my library code with checked exceptions. You call my library code in one of your methods. Th
by ragnese 6y ago
So you're saying checked exceptions are perfectly fine.
I'll write my library code with checked exceptions. You call my library code in one of your methods. The compiler tells you to do something about the possible failure. If you want to handle it there, you handle it with a try{}catch{}. If you don't, you wrap it in a RuntimeException and rethrow it so your top level handler can deal with it.
Perfect.
Unchecked exceptions make it easy to fuck up the case where you actually might want to handle it close to the call.