in reply to Re: Best practices for handling errors
in thread Best practices for handling errors
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Best practices for handling errors
by Anonymous Monk on Sep 27, 2014 at 13:39 UTC |