throwing C++ exceptions across C frames

Ben Liblit liblit@eecs.berkeley.edu
Tue Dec 31 03:22:00 GMT 2002


I wrote:
> However, if...
> 
>     - the C++ "catch" code calls some C function
>     - this C function then calls back into C++ code
>     - this C++ code now throws an exception
> 
> ...then the exception is not caught

Err, instead of `the C++ "catch" code' I probably should have said `the 
C++ "try" code'.

The C code is called from within a "try" block, and the "catch" clause 
for that "try" block is not called to handle the exception:

	C++:	try { transfer(); } catch (...) { }
	C:	transfer() calls toss()
	C++:	toss() throws an exception



More information about the Gcc mailing list