Skip to content

IsoCode.fromJson throws String instead of Exception, causing type safety issues #97

@ibmkynl

Description

@ibmkynl

throw 'Iso code not found $isoCodeStr ';

Location: https://github.com/cedvdb/phone_numbers_parser/blob/main/lib/src/iso_codes/iso_code.dart

The IsoCode.fromJson method in iso_code.dart throws a raw String instead of a proper Exception or Error object, which violates Dart best practices and causes type safety issues.

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