summary refs log tree commit diff stats
path: root/lib/pure/parsexml.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-desktop>2010-02-12 00:03:18 +0100
committerAndreas Rumpf <andreas@andreas-desktop>2010-02-12 00:03:18 +0100
commit16c0beb27c372ce431b54bab9750bbaab254acfb (patch)
treebde411156a230d29de9cbaefe30967755f90d6e4 /lib/pure/parsexml.nim
parentf721ddd75b61600a06995ee728f332fa96f45dd2 (diff)
downloadNim-16c0beb27c372ce431b54bab9750bbaab254acfb.tar.gz
further progress on the new XML processing modules
Diffstat (limited to 'lib/pure/parsexml.nim')
-rwxr-xr-xlib/pure/parsexml.nim6
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