Skip to content

Option.getUnsafe does not raise #130

Closed
@agarwal

Description

@agarwal

The documentation of Option.getUnsafe gives the example:

Option.getUnsafe(None) // Raises an error

However, the following code does not raise. I see undefined printed to the console and no exception.

let x = Option.getUnsafe(None)
Js.log(j`$x`)

Why is there also an Option.getExn function? That has the expected behavior, so I'm using that for now.

Metadata

Metadata

Assignees

No one assigned

    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