Exception Handling in Perl

Exceptions are an error handling technology that is very useful for large or complex systems. This month G. Wade Johnson gave a presentation on error handling strategies, focusing on exceptions.

In the discussion that followed the presentation, we discussed how exceptions work with the Catalyst framework. As part of the discussion, Wade reminded everyone that if the call tree of your application is mostly shallow, exceptions don't help as much. Exceptions are most useful when you end up with multiple levels of function calls between the low-level code and the high-level code.

Without that kind of complexity, exceptions may seem like more trouble that they are worth. The key point is that exceptions are one way to handle errors. This technique is one more tool in your toolkit. Use it when the trade-offs are right.

Don't forget that the notes are available either by printing the presentation or by selecting the Ø entry on the menu at the lower right.