Checked exceptions have always been a controversial feature of the Java language.
Advocates claim they ensure checking & recovery from failures. Detractors say “catch” blocks can almost never recover from an exception, and are a frequent source of mistakes.
Meanwhile, Java 8 and lambdas are here. Are checked exceptions becoming obsolete in the Java world? Continue reading
Threading is easy in Java, but today I was reminded of another of its pitfalls.
In Java- or container-provided threads, unhandled exceptions from our code will be printed or logged to the console. Create your own
Thread or use
ThreadPoolExecutor, and it’s a different story..
Threaded code tends to die silently. Nothing on the console or logs. Unhandled exceptions are invisible, and leave very few clues. Let’s look at why.