mirror of
https://github.com/status-im/NimYAML.git
synced 2025-02-04 23:45:08 +00:00
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:"
|
||||
try:
|
||||
writeStackTrace()
|
||||
echo "Internal stacktrace:"
|
||||
let exc = getCurrentException()
|
||||
if not isNil(exc.parent):
|
||||
echo "Internal stacktrace:"
|
||||
echo getStackTrace(exc.parent)
|
||||
except: discard
|
||||
echo "[NimYAML] Please report this bug."
|
||||
@ -33,9 +33,9 @@ template yAssert*(e: typed) =
|
||||
echo "[NimYAML] Stacktrace:"
|
||||
try:
|
||||
writeStackTrace()
|
||||
echo "Internal stacktrace:"
|
||||
let exc = getCurrentException()
|
||||
if not isNil(exc.parent):
|
||||
echo "Internal stacktrace:"
|
||||
echo getStackTrace(exc.parent)
|
||||
except: discard
|
||||
echo "[NimYAML] Please report this bug."
|
||||
|
Loading…
x
Reference in New Issue
Block a user