#1 batch behaviour of mismatched defs in imported modules


As per 423AC234.1000809@t-online.de, if you've got some
incorrect syntax in an imported module, such as

def pi=4*atan 1;

then you get your deserved "Value mismatch in
definition" error, but execution continues unabated. In
case of such an error, it should probably stop to
facilitate debugging in interactive mode, or abort
completely in batch mode.


  • Tim

    Tim - 2005-03-18

    Logged In: YES

    Also this is missing a file:line# so if I weren't aware of
    which edits I was testing, it could be *anywhere* in the
    source. Eek!

  • Albert Graef

    Albert Graef - 2005-03-18
    • assigned_to: nobody --> agraef
  • Albert Graef

    Albert Graef - 2005-07-02
    • status: open --> closed-fixed
  • Albert Graef

    Albert Graef - 2005-07-02

    Logged In: YES

    Fixed (kind of). The interpreter now recovers from such
    errors (continuing execution of remaining initialization
    code) and gives a proper error message with filename and
    line number for each of them. In batch mode the interpreter
    then exits with an exit code of 2.

    Is that good enough?

    Note that there is no way to report such errors in the
    debugger, as no rule is executing and hence there's no stack
    frame the debugger could be invoked upon. Thus I decided
    that in interactive mode it would be more friendly to
    continue to the command prompt, instead of bailing out.
    After all these are only runtime errors, so when the
    interpreter is running interactively, the user should be
    given an opportunity to determine what went wrong and fix
    things manually.


Log in to post a comment.