There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Thanks for replying! So, it would be better to use Carp's confess() or other backtracing tools (such as Devel::StackTrace, right?) for generating a stack trace and don't add anything to the error message, passing it to the topmost caller without any additions, right? And, yes, this usage of eval() has caveats, so I'm going to get used to Try::Tiny or TryCatch instead of it. May I ask you, what do you personally think on using die(), croak() or confess() inside of a method instead of returning undef? Thank you!
V.Melnik
In reply to Re^2: Best practices for handling errors
by v_melnik
|
|