diff options
author | Andreas Rumpf <andreas@andreas-desktop> | 2010-02-12 00:03:18 +0100 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-desktop> | 2010-02-12 00:03:18 +0100 |
commit | 16c0beb27c372ce431b54bab9750bbaab254acfb (patch) | |
tree | bde411156a230d29de9cbaefe30967755f90d6e4 /lib/pure/parsexml.nim | |
parent | f721ddd75b61600a06995ee728f332fa96f45dd2 (diff) | |
download | Nim-16c0beb27c372ce431b54bab9750bbaab254acfb.tar.gz |
further progress on the new XML processing modules
Diffstat (limited to 'lib/pure/parsexml.nim')
-rwxr-xr-x | lib/pure/parsexml.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pure/parsexml.nim b/lib/pure/parsexml.nim index a209e8be0..598ae6c68 100755 --- a/lib/pure/parsexml.nim +++ b/lib/pure/parsexml.nim @@ -196,6 +196,12 @@ proc errorMsgExpected*(my: TXmlParser, tag: string): string = ## other error messages result = "$1($2, $3) Error: $4" % [ my.filename, $getLine(my), $getColumn(my), "<$1> expected" % tag] + +proc errorMsg*(my: TXmlParser, msg: string): string = + ## returns an error message with text `msg` in the same format as the + ## other error messages + result = "$1($2, $3) Error: $4" % [ + my.filename, $getLine(my), $getColumn(my), msg] proc markError(my: var TXmlParser, kind: TXmlError) {.inline.} = my.err = kind |