mirror of https://github.com/status-im/NimYAML.git
move echo statement for internal stacktrace into if branch
No need to echo internal stacktrace, if there is no parent to echo for.
This commit is contained in:
parent
8a7750cb6c
commit
1babb26616
|
@ -15,9 +15,9 @@ template internalError*(s: string) =
|
||||||
echo "[NimYAML] Stacktrace:"
|
echo "[NimYAML] Stacktrace:"
|
||||||
try:
|
try:
|
||||||
writeStackTrace()
|
writeStackTrace()
|
||||||
echo "Internal stacktrace:"
|
|
||||||
let exc = getCurrentException()
|
let exc = getCurrentException()
|
||||||
if not isNil(exc.parent):
|
if not isNil(exc.parent):
|
||||||
|
echo "Internal stacktrace:"
|
||||||
echo getStackTrace(exc.parent)
|
echo getStackTrace(exc.parent)
|
||||||
except: discard
|
except: discard
|
||||||
echo "[NimYAML] Please report this bug."
|
echo "[NimYAML] Please report this bug."
|
||||||
|
@ -33,9 +33,9 @@ template yAssert*(e: typed) =
|
||||||
echo "[NimYAML] Stacktrace:"
|
echo "[NimYAML] Stacktrace:"
|
||||||
try:
|
try:
|
||||||
writeStackTrace()
|
writeStackTrace()
|
||||||
echo "Internal stacktrace:"
|
|
||||||
let exc = getCurrentException()
|
let exc = getCurrentException()
|
||||||
if not isNil(exc.parent):
|
if not isNil(exc.parent):
|
||||||
|
echo "Internal stacktrace:"
|
||||||
echo getStackTrace(exc.parent)
|
echo getStackTrace(exc.parent)
|
||||||
except: discard
|
except: discard
|
||||||
echo "[NimYAML] Please report this bug."
|
echo "[NimYAML] Please report this bug."
|
||||||
|
|
Loading…
Reference in New Issue