Process lifetimes must take integer values (i.e. whole number of years). If float values (e.g. 15.1) or negative values (e.g. -15) are provided, there should be a clear error message saying that only positive integer values are allowed. Instead, we currently get a rather cryptic "Invalid digit found in string" message. Presumably this comes from serde trying to deserialise into a u32. Perhaps instead we need to deserialise into a float, do the validation checks manually, then convert to u32 (or some other approach).
Side note, but the tests are currently only checking for the presence of an error, not the exact error message. We should fix this up as well.
Process lifetimes must take integer values (i.e. whole number of years). If float values (e.g. 15.1) or negative values (e.g. -15) are provided, there should be a clear error message saying that only positive integer values are allowed. Instead, we currently get a rather cryptic "Invalid digit found in string" message. Presumably this comes from serde trying to deserialise into a
u32. Perhaps instead we need to deserialise into a float, do the validation checks manually, then convert tou32(or some other approach).Side note, but the tests are currently only checking for the presence of an error, not the exact error message. We should fix this up as well.