This is what GeckoVersion raises:
|
Raises: |
|
PatternNotMatchedError: if the string doesn't match the pattern of a valid version number |
|
MissingFieldError: if a mandatory field is missing in the string. Mandatory fields are |
|
`major_number` and `minor_number` |
|
ValueError: if an integer can't be cast or is not (strictly) positive |
|
TooManyTypesError: if the string matches more than 1 `VersionType` |
|
NoVersionTypeError: if the string matches none. |
I initially thought it would be a good idea to have distinct error types, but after years of use, mozilla-version users just would like to know if a version was correctly parsed or not. It would be great to change GeckoVersion (and likely BaseVersion too) to just return a single error type.
This is what
GeckoVersionraises:mozilla-version/mozilla_version/gecko.py
Lines 103 to 109 in ea853e0
I initially thought it would be a good idea to have distinct error types, but after years of use,
mozilla-versionusers just would like to know if a version was correctly parsed or not. It would be great to changeGeckoVersion(and likelyBaseVersiontoo) to just return a single error type.