exceptions in Mech
am 08.11.2005 20:36:56 von gedankenHow can i prevent mechanize from catching exceptions and grab them myself?
For example, when I try to trap an exception a la
eval {
$agent->form(1);
};
if ($@) {
print "Yikes, we cant find the form on page: \n\n " .
$agent->content . "\n\n";
}
The Yikes will never execute, but instead I always see
There is no form numbered 1 at
/usr/foo/bar/src/lib/Stuff.pm line 428
and the program dies immediately.
PS Mechanize is the greatest thing ever written
--
gedanken