Re: Try/Catch
- Posted by mattlewis (admin) Jan 09, 2015
- 5517 views
PeteE said...
Funny you should mention setjmp/longjmp, I've been working on trying to figure out how exactly that would work in a C program. The big problem is that you need to cleanup and call destructors for objects in the functions that are getting jumped over getting to the catch block.
We know what we need to clean up at the end of a function. We'd just have to know what was still in scope based on different scopes in the function and DeRef it all. Surely not as simple as I make out, of course.
PeteE said...
Another option would be to translate to C++ and use try/catch natively.
I've had the same thought.
Matt