Error Reporting

This Atom is Under Construction

In Exception Handling, we made the case that recovering from errors is a relatively rare situation, and the try-catch-finally syntax puts a heavy burden on the programmer to support this infrequent possibility.

This atom demonstrates alternative idioms that Kotlin provides to support easy error reporting without the overhead of the classic exception-handling mechanisms. In the majority of programming situations you can use these idioms, which are easier to write and think about and produce more comprehensible code.

End of sample. See AtomicKotlin.com for full early-access book.



Previous          Next

©2018 Mindview LLC. All Rights Reserved.