Course of Raku / Objects, I/O, and
exceptions / Exceptions / Catching exceptions with try / Exercises
When nothing goes wrong
Problem
Use a try block that computes 21 * 2 and
does not fail. Print whether the result is defined, and
then print the result itself.
Example
The program prints:
True
42Solution
Course navigation
← Solution: Catch the error | Solution: When nothing goes wrong →