Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/pure/asyncfutures.nim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ when defined(nimPreviewSlimSystem):
import std/objectdollar # for StackTraceEntry
import std/assertions

const asyncTracebacks {.define.} = not defined(release)

# TODO: This shouldn't need to be included, but should ideally be exported.
type
CallbackFunc = proc () {.closure, gcsafe.}
Expand Down Expand Up @@ -336,7 +338,7 @@ proc `$`*(stackTraceEntries: seq[StackTraceEntry]): string =
dec i

proc injectStacktrace[T](future: Future[T]) =
when not defined(release):
when asyncTracebacks:
const header = "\nAsync traceback:\n"

var exceptionMsg = future.error.msg
Expand Down
Loading