Stages of error handling:
$rc = func(); if ($rc != 0) { die "Failed to func!"; }
eval { func(); } if ($@) { die "Failed to func: $@"; }
use Error::Handler; $rc = func(); if (not $rc->ok()) { die $rc->error_msg(); }
$rc = func(); if ($rc != 0) { die "Failed to func!"; }
At least, that's my experience...
In reply to Re: Thinking about module error handling
by Tanktalus
in thread Thinking about module error handling
by sgifford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |