in reply to Using Perl Exception Class
You don't tell us what concept of "structured exception" you are using. If you are using one of the modules on CPAN, like Exception::Class or Exception, have you looked at the documentation?
If you think implementing your own mechanism makes sense, take a look at eval and/or Try::Tiny.
As an aside, the code you posted does not compile. Perl does not like the kinds of quotes you use:
”Performing the command” # should be "Performing the command" ‘MyException’ # should be 'MyException'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Perl Exception Class
by Perllace (Acolyte) on Apr 20, 2011 at 09:18 UTC | |
by Corion (Patriarch) on Apr 20, 2011 at 09:37 UTC | |
by Perllace (Acolyte) on Apr 20, 2011 at 10:51 UTC | |
by Corion (Patriarch) on Apr 20, 2011 at 11:29 UTC |