Skip to content

Error modules cleanup #7377

Closed
Closed
@cknitt

Description

@cknitt

Currently we have both Exn and Error modules in the standard library, and we suggest to catch JS errors as Exn.Error(error) (with error having type exn).

Instead, we should document catching JsError(error) (built-in type) with error having type unknown and provide related helper functions in the Error module.

Possibly consider a different/better name than JsError. Error is not ideal either, as it conflicts with the Result module.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions