This commit is contained in:
flywind 2021-08-09 02:44:14 +08:00 • committed by GitHub
commit a7e622267e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -521,10 +521,10 @@ proc getStackTrace(e: ref Exception): string =
else: else:
result = "" result = ""
proc getStackTraceEntries*(e: ref Exception): seq[StackTraceEntry] = proc getStackTraceEntries*(e: ref Exception): lent seq[StackTraceEntry] =
## Returns the attached stack trace to the exception `e` as ## Returns the attached stack trace to the exception `e` as
## a `seq`. This is not yet available for the JS backend. ## a `seq`. This is not yet available for the JS backend.
shallowCopy(result, e.trace) e.trace
proc getStackTraceEntries*(): seq[StackTraceEntry] = proc getStackTraceEntries*(): seq[StackTraceEntry] =
## Returns the stack trace entries for the current stack trace. ## Returns the stack trace entries for the current stack trace.