Menu

#4660 Errors thrown by the expr command may give NONE as errorCode

obsolete: 8.5.8
closed-fixed
5
2010-07-02
2010-07-02
No

Consider the following erroneous calls to expr:

expr {sqrt(-1)/2.0} and expr {sqrt(1/2.0}

The error messages are clear enough - a non-numeric floating point value in the first case and a missing parenthesis in the second.
In both cases however errorCode is NONE.

This makes it hard to distinguish domain errors and syntax errors

Tcl version: 8.5.8

Discussion

  • Donal K. Fellows

    • labels: --> 47. Bytecode Compiler
    • milestone: --> 897381
    • assigned_to: nobody --> dkf
     
  • Donal K. Fellows

    Fixed on HEAD

     
  • Donal K. Fellows

    • milestone: 897381 --> obsolete: 8.5.8
     
  • Donal K. Fellows

    Fixed on 8.5 branch.

    Always now it's ARITH DOMAIN in the case you describe (since NaN isn't in the domain of *any* math operator!)

     
  • Donal K. Fellows

    • status: open --> closed-fixed