exceptions: Java exception handling companion code (suppression, chaining, cost)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KqJyCidz3ZgRyHABv2GVJh
This commit is contained in:
2026-09-30 18:45:53 +00:00
co-authored by Claude Sonnet 5.5
parent 4a74153d87
commit bfa7f97432
32 changed files with 688 additions and 0 deletions
@@ -0,0 +1,15 @@
=== which are checked? ===
Exception CHECKED Exception -> Throwable -> Object
IOException CHECKED IOException -> Exception -> Throwable -> Object
InterruptedException CHECKED InterruptedException -> Exception -> Throwable -> Object
RuntimeException unchecked RuntimeException -> Exception -> Throwable -> Object
IllegalArgumentException unchecked IllegalArgumentException -> RuntimeException -> Exception -> Throwable -> Object
NullPointerException unchecked NullPointerException -> RuntimeException -> Exception -> Throwable -> Object
Error unchecked Error -> Throwable -> Object
OutOfMemoryError unchecked OutOfMemoryError -> VirtualMachineError -> Error -> Throwable -> Object
StackOverflowError unchecked StackOverflowError -> VirtualMachineError -> Error -> Throwable -> Object
=== checked exception inside a stream lambda: wrap in UncheckedIOException ===
contents of a.txt
caught: java.io.UncheckedIOException: java.io.IOException: cannot read bad.txt
original cause: java.io.IOException: cannot read bad.txt