in reply to Re^3: the try/catch example from "Programming Perl" analyzed
in thread the try/catch example from "Programming Perl" analyzed
You could always use some sort of object wrapper to convert the strings into error objects, and hide that in the 'try' code,
or some such. That class (or a function that returns different error objects depending on the error string, or something), would know all about the Errno module, and other standard kinds of errors.local $_ = (blessed $@) ? $@ : MyStringErrorClass->new($@);
|
---|