#187 dError/dDebug should only abort if there is no error handler


ODE supports installing error handlers via dSetError/Debug/MessageHandler().
Unfortunately, dError and dDebug call exit() and abort() repectively, regardless of there being an error handler set.
I propose to only exit/abort if no handler has been set. Otherwise the error handler should do exactly that: handle the error.

patch attached.


  • DonLorenzo

    DonLorenzo - 2013-06-04

    stupid sf.net... here is the patch...

  • Oleh Derevenko

    Oleh Derevenko - 2013-08-04

    Sorry, dError/dDebug are the handlers for a kind of assertion check errors and the application can't continue after them. The handler function is provided for library user to let terminate the application in native to that application manner (with error messages/logging/dumping/cleanup consistent to host application). However if host application fails to terminate in the handler, ODE has not other way out except for calling exit/abort() itself.
    dMessage() however is the function supposed to handle warnings and it does not call application termination APIs at end.
    Also please remember that your application should not normally be compiled with assertion checks enabled for release. Look for the command line options in configure scripts regarding how to disable assertion checking.

  • Oleh Derevenko

    Oleh Derevenko - 2013-08-04
    • Status: open --> wont-fix

Log in to post a comment.