Bug #1614
SourceRegion gives misleading error mesg
Description
Here is the simplified failing example from issue #1613:
F3 ::= ZZ/(3); phi := CanonicalHom(ZZ,F3); psi := InducedHom(QQ,phi); a:=psi(1/3);
If I send these lines to CoCoA-5 (inside emacs) using SourceRegion
then the correct error mesg is not produced, but instead:
--> ERROR: Line number or char position too large or negative --> SourceRegion 11,1 to 15,1 in "/home/jabbott/ShortTerm/BUG-FrF.cocoa5"; --> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Why? The printed error is completely unhelpful (and wrong!)
Related issues
History
#1 Updated by John Abbott over 2 years ago
The relevant source code is around line 4170 in Interpreter.C
inside the function void SourceRegionStatement::implExecute(RuntimeEnvironment *runtimeEnv)
#2 Updated by John Abbott over 2 years ago
- Related to Bug #1613: CRASH with RingHom from FrF added
#3 Updated by John Abbott over 2 years ago
- Status changed from New to Resolved
- Assignee set to John Abbott
- % Done changed from 0 to 80
I have rather blindly changed the interpreter. The code now seems to work as hoped (but I am not too confident that other nasty surprises aren't lurking in ambush).
#4 Updated by John Abbott over 2 years ago
- Status changed from Resolved to Feedback
- % Done changed from 80 to 90
#5 Updated by John Abbott over 2 years ago
- Status changed from Feedback to Closed
- Target version changed from CoCoA-5.4.2 to CoCoA-5.4.0
- % Done changed from 90 to 100
- Estimated time set to 1.66 h