As with Java and some other programming languages, Kotlin uses
to help deal with possible exceptions. You wrap the code that might raise an
try, and you then chain a
catch block to deal with an exception
if one is raised. The
catch block gets the exception (
e in this case) and
can use it, such as printing it as we are doing here.