Skip to content

Refactor: Improve country code conversion failure modes #2845

@hoffie

Description

@hoffie

I'd rather "convert to wireformat" and "convert from wireformat" were both "safe" - i.e. returned "Error" (e.g. -1) or a valid response, given any integer value, then have the caller deal with the error as it sees fit. Having to "know" about the IsCountryCodeSupported on top of the conversion methods seems excessively complicated.

Originally posted by @pljones in #2829 (comment)

Metadata

Metadata

Assignees

Labels

refactoringNon-behavioural changes, Code cleanup

Type

No type

Projects

Status

Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions