Logger improvements.
h3rald h3rald@h3rald.com
Wed, 09 Nov 2016 17:31:18 +0100
3 files changed,
9 insertions(+),
6 deletions(-)
M
core/consts.nim
→
core/consts.nim
@@ -28,13 +28,13 @@ version = e.value
else: discard of cfgError: - error("Configuration error.") + fatal("Configuration error.") quit(1) else: discard close(p) else: - error("Cannot process configuration file.") + fatal("Cannot process configuration file.") quit(2)
M
lib/min_lang.nim
→
lib/min_lang.nim
@@ -240,6 +240,7 @@ var file = s.getString
if not file.endsWith(".min"): file = file & ".min" file = i.pwd.joinPath(file) + info("[load] File: ", file) if not file.fileExists: raiseInvalid("File '$1' does not exists." % file) i.load file
M
minim.nim
→
minim.nim
@@ -66,6 +66,8 @@ elif word.startsWith("~"):
return symbols.mapIt("~" & $it) if word.startsWith("@"): return symbols.mapIt("@" & $it) + if word.startsWith("#"): + return symbols.mapIt("#" & $it) if word.startsWith(">"): return symbols.mapIt(">" & $it) if word.startsWith("*"):@@ -141,15 +143,15 @@
proc minimFile*(filename: string) = var stream = newFileStream(filename, fmRead) if stream == nil: - error("Cannot read from file: "& filename) - quit(100) + fatal("Cannot read from file: "& filename) + quit(3) minimStream(stream, filename) proc minimFile*(file: File, filename="stdin") = var stream = newFileStream(stdin) if stream == nil: - error("Cannot read from file: "& filename) - quit(100) + fatal("Cannot read from file: "& filename) + quit(3) minimStream(stream, filename) proc printResult(i: In, res: MinValue) =