4 ms·
For all my grumbling about Java, I guess exception chaining is one thing they actually did get right from the beginning: throw new RuntimeException( "App featu
by Roboprog 14y ago
For all my grumbling about Java, I guess exception chaining is one thing they actually did get right from the beginning:
throw new RuntimeException( "App feature X broke ...", e);
Could be worse, could be C -- setjmp/longjmp :-)
Actually, longjmp is pretty useful, but it typically makes for "course grained" error handling, and you better have a good error message logged before jumping back. As well as protect yourself from resource leaks...