2 ms·
Well, I'm writing Java code and exception can be thrown from literally every function call. It's hard to not expect it. It's easier to find code that never thro
by vbezhenar 7y ago
Well, I'm writing Java code and exception can be thrown from literally every function call. It's hard to not expect it. It's easier to find code that never throws exceptions. It does not make it any harder to write. Basically you use try-finally for resource release and avoid long living mutable objects (which survive request for typical request-response style server) or write code extra carefully, so those objects don't stay in bad state, but those objects are extremely rare. So in the end it's not hard to write that code.