Jump to content

Raku Programming/Exceptions and Handlers

From Wikibooks, open books for an open world

Exceptions

[edit | edit source]

In the most basic sense, exceptions represent errors that are caused by your program. However, instead of crashing your program, exceptions have the opportunity to be caught and handled gracefully. Exceptions are said to be raised or thrown, and special code blocks called handlers can catch them.

Exception Objects

[edit | edit source]

Handlers and CATCH blocks

[edit | edit source]