[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

[ hangs ]

With this patch, it reports the error:

$ rune demo.updoc

updoc: started

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.



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

More information about the e-lang mailing list