Patch for review: show updoc errors immediately
Thomas Leonard <tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]> Wed, 21 Sep 2011 14:37:04 +0100
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
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-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected] http://www.it-innovation.soton.ac.uk/