Skip to content

Throw exception instead of return null when env var not found #72

@cies

Description

@cies

It would be great if there could be an configuration option that makes dotenv throw and exception if an env var was not found.

Currently it returns null in those cases.

Alternatively (especially useful in Kotlin) there could be getOrNull and getOrThrow methods, where the last one returns a non-null String value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions