http://qs321.pair.com?node_id=11102517


in reply to Re^4: Error codes vs die exceptions vs ...
in thread Error codes vs die exceptions vs ...

Then you'd need to propagate the unhandled exception classes

That's true for Try::Tiny. My first encounter with Perl's exceptions "beyond eval/die" was Error, which is much like Java in that it allows you to catch a particular error class, and passes all other errors on. TryCatch also does this, but I've never used it.

Error has its quirks as is clearly indicated in the module's description (section "Warnings"), and TryCatch uses the spooky Devel::Declare, so getting accustomed to propagate unhandled errors is probably a good idea.

  • Comment on Re^5: Error codes vs die exceptions vs ...