Skip to content

Asynchronous procedures losing current exception in exception handler. #12764

Open
@cheatfate

Description

@cheatfate

Example

import asyncdispatch

proc test1() {.async.} =
  try:
    raise newException(ValueError, "Test1")
  except:
    await sleepAsync(200)
    raise

when isMainModule:
  waitFor test1()

Current Output

Exception message: no exception to reraise
Exception type: [ReraiseError]

Expected Output

Exception message: Test1
Exception type: [ValueError]

Metadata

Metadata

Assignees

Labels

AsyncEverything related to Nim's async

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions