[e-lang] Patch for review: show updoc errors immediately

Thomas Leonard tal at it-innovation.soton.ac.uk
Wed Sep 21 06:37:04 PDT 2011


One problem I frequently hit with updoc is that it doesn't report errors 
until the script finishes. But, often, the error prevents the script 
from finishing. Then you have to bisect the script manually until you 
see the error.

As a simple test case, consider:

   ? def a
   ? bind a = 3
   ? interp.waitAtTop(a)
   ? a
   # value: 3

This script (which contains a syntax error on the second line), will 
silently hang:

$ rune demo.updoc

updoc: started

/tmp/demo.updoc:..
[ hangs ]


With this patch, it reports the error:

$ rune demo.updoc

updoc: started

/tmp/demo.updoc:...
at: <file:/tmp/demo.updoc#:span::3:4::3:13>
expr: bind a = 3
missing original syntax error
new syntax error: use ':=' for assignment, or '==' for equality


Another side-effect of this is that if the abortEarly flag is set by a 
test case, the tests do actually abort.

Patch:

http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/dca612f2a472451881c00ea02e290a398a92b22e


-- 
Dr Thomas Leonard
IT Innovation Centre
Gamma House, Enterprise Road,
Southampton SO16 7NS, UK


tel: +44 23 8059 8866

mailto:tal at it-innovation.soton.ac.uk
http://www.it-innovation.soton.ac.uk/


More information about the e-lang mailing list