in reply to Thinking about module error handling
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...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Thinking about module error handling
by sgifford (Prior) on Jun 14, 2005 at 00:04 UTC |