From 16c0beb27c372ce431b54bab9750bbaab254acfb Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 12 Feb 2010 00:03:18 +0100 Subject: further progress on the new XML processing modules --- lib/pure/parsexml.nim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/pure/parsexml.nim') 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 -- cgit 1.4.1-2-gfad0