[dev-context] XML error reporting

Hans Hagen pragma at wxs.nl
Tue Oct 2 09:05:26 CEST 2007

Mojca Miklavec wrote:
> Hello Hans,
> the lua XML parser works nice: no errors are tolerated at all, so the
> following example:
> <?xml version="1.0" encoding="utf-8"?>
> <story>
> <windows>my secret</mouse>
> </story>
> will fail with a friendly message, but it would be really helpful if
> one would know at which line in the source file the error has happened
> to help debugging.

hm, only if it does not slow down parsing; a counter would involve extra 
line end parsing so that would be a slow downer, but maybe i can reparse 
the stored partial tree in case of an error

> Btw: \xmlprocess doesn't complain if the file is not found. I spent
> quite some time trying to figure out what I did wrong in the
> definitions again, only to figure out that the file had been saved
> under a different location :(

sure, this is only low level stuff, some day i will extend it

> None of this is high-priority, but only
> "would-be-nice-to-have-in-distant-future" request.

ok, so remind me in that future -)

btw, i like the example -)

 >mtxrun.cmd  --script "test.lua"
load	unable to close windows with mouse


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the dev-context mailing list