Path: utzoo!mnetor!uunet!husc6!bbn!rochester!cornell!uw-beaver!tikal!hplsla!jima From: jima@hplsla.HP.COM ( Jim Adcock) Newsgroups: comp.lang.c++ Subject: Try/Recover in C++ ??? Message-ID: <6590011@hplsla.HP.COM> Date: 22 Jan 88 22:25:50 GMT Organization: HP Lake Stevens, WA Lines: 21 Has anyone figured out a good way to do "try/recover-type" schemes in C++ without hacking up the language? IE no fair hacking up cfront, nor adding another preprocessor, nor postprocessor, nor adding new keywords. So, is there anyway to implement try/recover using some kind of classes, considering the process itself to be an object, or something like that? Or is it necessary to extend the definition of the language to include "try/recover"-type capabilities? Any other bright ideas on how to recover from errors within a body of software [that may include c++ functions]? [The big problem I see with try/recover schemes in C++ is that when you get a failure in a member function, then you presumably bounce out, taking an extrodinary exit from the member function, in order to get to the surrounding context provided by the recover statement. So how do you get the routine which took the extrodinary exit to correctly destroy its local objects when it bounces to the surrounding context?]