Skip to content

Use of generic "throw Error" #12

@felix0908

Description

@felix0908

Hi there! Your project's been pretty helpful, so thanks for making it.

I was wondering if you'd consider replacing your throw new Error() statements with a less generic error, ideally a custom one for this project. That way it's much easier to specifically target these errors in any code making use of this project.

This would for example come in handy when you're batch processing a large number of addresses, and want to log the ones that weren't successfully formatted. While you can currently specify a fallback country code, you wouldn't know whether the fallback was used to format the address or not.

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