types: Status: improve parsing and error reporting

master
nixo 2020-10-26 21:06:43 +01:00
parent cceeffe737
commit 06371bd542
1 changed files with 2 additions and 2 deletions

View File

@ -5,8 +5,8 @@ struct Status
# FIXME: error codes
function Status(ma::Char, mi::Char, meta::String)
'1' <= ma <= '6' || throw("Invalid")
'0' <= mi <= '9' || throw("Invalid")
'1' <= ma <= '6' || throw("Invalid: first status out of range")
isnumeric(mi) || throw("Invalid: second status not a number")
if length(meta) > 1024
throw("Invalid")
end