Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you know about any other approaches to error handling than try/catch and its variations?

I am interesting in knowing some other approaches to error handling in programming languages other than try/catch and its variations.

Does anyone know some interesting cases of such an error handling?

like image 335
Jarek Avatar asked Jan 23 '12 10:01

Jarek


1 Answers

Well, there's also good old

ON ERROR RESUME NEXT

Also, some programming languages (some Lisps and Schemes, maybe Smalltalk) separate raising an exception from escaping (ie, unwinding the stack). That is, it's possible in some circumstances to handle an exception in the context where it is raised and continue computation---these are called continuable exceptions.

like image 92
Ryan Culpepper Avatar answered Sep 28 '22 02:09

Ryan Culpepper