July 2018
Intermediate to advanced
400 pages
12h 14m
English
In Kotlin, all exceptions are unchecked.
This means that the Kotlin compiler does not force you to wrap all code that could produce an exception in a try/catch statement.
Compare this with Java, for example, which supports a mixture of both checked and unchecked exception types.
With a checked exception, the compiler checks that the exception is guarded against, requiring you add a try/catch to your program.
This sounds reasonable. But in practice, the idea of checked exceptions does not hold up as well as the inventors thought it would. Often, checked exceptions are caught (because the compiler requires the checked exception to be handled) and then simply ignored, just to allow ...
Read now
Unlock full access