No need to recurse now that mergeEntries doesn't do any pattern matching.
This commit is contained in:
parent
6301e33543
commit
383c80971c
2 changed files with 4 additions and 3 deletions
|
|
@ -248,9 +248,10 @@ proc mergeEntries(entries: seq[StackTraceEntry]): seq[StackTraceEntry] =
|
|||
reRaiseEnd.inc()
|
||||
assert entries[reRaiseEnd].procName.isNil
|
||||
assert entries[reRaiseEnd].line == -100 # Signifies end of re-raise block.
|
||||
let reRaisedEntries = mergeEntries(entries[i+1 .. reRaiseEnd-1])
|
||||
let reRaisedEntries = entries[i+1 .. reRaiseEnd-1]
|
||||
|
||||
let (lastIndex, remainder) = diff(result, reRaisedEntries)
|
||||
# Insert all the entries after lastIndex.
|
||||
for i in 0..<remainder.len:
|
||||
result.insert(remainder[i], lastIndex+i)
|
||||
i = reRaiseEnd+1
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Async traceback:
|
|||
asyncmacro.nim(34) a_continue
|
||||
└─Resumes an async procedure
|
||||
asyncmacro.nim(0) aIter
|
||||
asyncfutures.nim(340) read
|
||||
asyncfutures.nim(341) read
|
||||
asyncmacro.nim(34) a_continue
|
||||
└─Resumes an async procedure
|
||||
tasync_traceback.nim(81) aIter
|
||||
|
|
@ -36,7 +36,7 @@ Async traceback:
|
|||
asyncmacro.nim(34) foo_continue
|
||||
└─Resumes an async procedure
|
||||
asyncmacro.nim(0) fooIter
|
||||
asyncfutures.nim(340) read
|
||||
asyncfutures.nim(341) read
|
||||
asyncmacro.nim(34) bar_continue
|
||||
└─Resumes an async procedure
|
||||
tasync_traceback.nim(94) barIter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue