Removed trailing ws; JS fixes

* do not call writeStackTrace() if compiling to JS
This commit is contained in:
Felix Krause 2016-08-30 22:15:29 +02:00
parent 34cbe61479
commit ef9159ab98
8 changed files with 101 additions and 99 deletions

View File

@ -401,6 +401,7 @@ template internalError(s: string) =
let ii = instantiationInfo()
echo "[NimYAML] Error in file ", ii.filename, " at line ", ii.line, ":"
echo s
when not defined(JS):
echo "[NimYAML] Stacktrace:"
try: writeStackTrace()
except: discard
@ -412,6 +413,7 @@ template yAssert(e: typed) =
let ii = instantiationInfo()
echo "[NimYAML] Error in file ", ii.filename, " at line ", ii.line, ":"
echo "assertion failed!"
when not defined(JS):
echo "[NimYAML] Stacktrace:"
try: writeStackTrace()
except: discard