Skip to content

Expose LuxonError and all its subclasses #1755

@NorthLake

Description

@NorthLake

Is your feature request related to a problem? Please describe.
I have Settings.throwOnInvalid set to true, so that I always know to handle invalid time objects immediately. However, if I want to check wether an error is actually an Invalid[..]Error (DateTime/Interval/etc.), I can't do that by checking the instance of the error. That's because the error classes themselves aren't exposed and therefore cannot be imported. So I'd either have to assume the error is an Invalid[..]Error, or I have to use a hacky way to check the type through the prototype.

Describe the solution you'd like
Please expose LuxonError and all its subclasses

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions