Menu

#27 internal failures go to stderr, not visible to calling code

open
nobody
None
5
2014-08-18
2006-09-27
No

From a pyode simulation I get:

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

Firstly, these errors should be returned to the calling
code in a programatic way from world.step(). There is
currently no way to detect this output from within a
python application. It's possible the C API already
supports returning errors; unfortunately the manual says:

"9.4. Error and memory functions
[Document these later]."

so I don't know...

Secondly, writing text error strings to stderr should
be disabled (or an api call for this provided). Python
has its own logging framework (like Java's log4j)
through which error messages are usually sent. Ode
subverts this by writing directly to stderr which is
often undesirable (eg. when a console application is
controlling the ode simulations).

Discussion

  • Bram Stolk

    Bram Stolk - 2006-10-07

    Logged In: YES
    user_id=14028

    I don't think this is a logging problem, but more of an
    exception problem.

    Would it not be better to have the LCP throw an exception?

    Python has perfectly good tools for catching exceptions.

     
  • Chris Bainbridge

    Logged In: YES
    user_id=428581

    Would the step() still have been carried out, or would an
    exception indicate failure? Are these errors fatal, or do
    they only reduce simulation accuracy?

     

Log in to post a comment.