Just another Perl shrine | |
PerlMonks |
Re^2: Error codes vs die exceptions vs ...by LanX (Saint) |
on Jul 06, 2019 at 13:49 UTC ( [id://11102476]=note: print w/replies, xml ) | Need Help?? |
> but it should still be used with caution, as the flow is much harder to follow - throwing an exception is just a goto in disguise! IMHO from inside deeply nested routines you can only to create a report, which is a $SIG{__DIE__/__WARN__} in disguise. Anything else is maintenance hell. Exceptions - which are not necessarily errors - should be handled as close as possible/reasonable otherwise you get "global" programming where you need to handle non local events.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|