Skip to content

json module incompatible with checked exceptions #17399

@arnetheduck

Description

@arnetheduck

json module is broken with regards to checked exceptions (as is most of the std library, this is just one example) - Exception should no longer be raised per recent changes to the Exception hierarchy, yet json and many other modules provide inaccurate exception information in their API.

import json
func f() {.raises: [CatchableError].} = discard parseJson("test")
/usercode/in.nim(3, 58) Error: can raise an unlisted exception: Exception

nim 1.2.6, 1.4.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions