[ODE] Have LCP throw exceptions?

Jon Watte (ODE) hplus-ode at mindcontrol.org
Sat Oct 7 22:26:27 MST 2006

Exceptions have two problems:

1) They don't work in C.
2) They have a non-zero cost, even when not thrown, in Microsoft Visual C++.

I remember back in the days when we implemented zero-overhead exceptions 
in CodeWarrior, but apparently Microsoft didn't want to go that route :-(

An alternative would be to let the user register an "exception handler" 
function pointer which we call in these cases, and the user can do 
whatever he/she wants. Meanwhile, the default would probably call abort().


          / h+

Bram Stolk wrote:
> Hi,
> Would it make sense to convert LCP errors that go to stderr into exceptions?
> I think it would help the reporter of this issue:
> https://sourceforge.net/tracker/index.php?func=detail&aid=1566355&group_id=24884&atid=382799
> Or would that cause problems if you use ODE in a C environment, instead of C++ ?
>    Bram
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode

More information about the ODE mailing list