You have the basic flow down, but the "catch" part can be simplified. Exception::Class provides a "caught" method that returns the exception object if it is of the right class or false. See "Catching Exceptions" in the Fine Manual for Exception::Class.
In reply to Re: Exception::Class - how to use?
by herveus
in thread Exception::Class - how to use?
by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |