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
Fixed on HEAD
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!)