Summary
In this chapter, we learned about working with exceptions in Perl 6. We examined in detail ways to throw, catch, and hide exceptions by using different mechanisms of the language—try
blocks and CATCH
phasers. We talked about soft failures, which are postponed exceptions that are only thrown when it is really unavoidable. Also, we demonstrated how to use the object-oriented approach to handle exceptions of different types and how to create a custom exception.