From 06371bd54271775d40482f03fe4b2339b9ba2592 Mon Sep 17 00:00:00 2001 From: nixo Date: Mon, 26 Oct 2020 21:06:43 +0100 Subject: [PATCH] types: Status: improve parsing and error reporting --- src/types.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.jl b/src/types.jl index 89fc1c0..ddff82c 100644 --- a/src/types.jl +++ b/src/types.jl @@ -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