This commit is contained in:
Andreas Rumpf
2017-10-26 12:45:00 +02:00
parent 129a599cd6
commit d50260de20

View File

@@ -72,7 +72,10 @@ proc raiseEInvalidCsv(filename: string, line, col: int,
msg: string) {.noreturn.} =
var e: ref CsvError
new(e)
e.msg = filename & "(" & $line & ", " & $col & ") Error: " & msg
if filename.len == 0:
e.msg = "Error: " & msg
else:
e.msg = filename & "(" & $line & ", " & $col & ") Error: " & msg
raise e
proc error(my: CsvParser, pos: int, msg: string) =