
On Mon, Dec 6, 2010 at 3:10 PM, Edd Dawson <lists@mr-edd.co.uk> wrote:
Looking again at the JPEG code here. As far as I can tell setjmp/longjmp have been used with appropriate care, but I worry what will happen if a method on a Device throws an exception, for example. I've had both Visual C++ 2008 and Apple's g++ 4.0.1 crash on me in this kind of situation.
Did you use -fexceptions with GCC, and if I'm not mistaken MSVC also has an option to assume that C functions don't throw exceptions, which shouldn't be used for exceptions to work.
In my code, I attempt to store an exception by doing something akin to boost::current_exception(), then longjmp out to a safe point before re-throwing it.
Probably boost::copy_exception would be a more appropriate call in this case. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode