Alex Rivera | Logout

How are try/catch blocks implemented?

Asked 2010-09-27T09:39:40.527
21

If an exception occurs in a try block, how is execution transferred to the catch block? This is not a C#/Java/C++ question, I'm just wondering how it works internally.

Edit
Report

1 Answer

0

you could do the same in C even though there is no exception handling per se.

There you would use setjmp/longjmp unfortunately you then do not get the stack unwinding and have to handle all the nitty-gritty yourself.

answered 2010-09-27T09:45:42.357

Your Answer