Skip to content

Naked raised causes wrong exception effect #25400

@arnetheduck

Description

@arnetheduck

Nim Version

2.2.4

Description

proc g() = discard
proc f() {.raises: [IOError].} =
  try:
    g()
  except IOError:
    raise

f()

from the except context, it's an IOError. With except:, it would be CatchableError.

Current Output

/usercode/in.nim(6, 5) Error: Exception can raise an unlisted exception: Exception

Expected Output


Known Workarounds

No response

Additional Information

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions