I
Irving Kimura
I often come across the advice to use Carp::croak instead of die,
presumably because croak reports the error "from the perspective
of the caller", but I don't understand why this is generally
considered so much better.
If I'm interested in the caller's perspective, I use the Perl
equivalent of try/catch (i.e. eval/if($@)). This gives me access
to information both about the caller *and* about the called function.
Am I missing something?
Thanks!
Irv
--
presumably because croak reports the error "from the perspective
of the caller", but I don't understand why this is generally
considered so much better.
If I'm interested in the caller's perspective, I use the Perl
equivalent of try/catch (i.e. eval/if($@)). This gives me access
to information both about the caller *and* about the called function.
Am I missing something?
Thanks!
Irv
--