2013/10/14 James Turner <zakal...@mac.com>:
> +            catch(...)
> +            {
> +              naRuntimeError(c, "Unknown exception in method call.");
> +            }
> +
>
> I am slightly concerned about catching all exceptions this way - I agree
> catching std::exception is worthwhile, with the specialisation for
> sg_exception since we can provide better logging and reporting, but I really
> hope no-one is throwing arbitrary objects not inheriting from
> std::exception. We used to have some bad cases of people throwing
> std::string but I cleaned those up years ago.

There are still some catch(...) and catch(std::string/const char*)
around... I just wanted to make sure that no exception will every pass
on to C space, as this leads to undefined behaviour and probably also
a crash. I don't know who will use cppbind to register whatever is
needed in the future, so I think its better to throw a Nasal runtime
error than to let the whole program crash.

Tom

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to