diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/uid.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -20,13 +20,13 @@ impl<'de> Visitor<'de> for UIDVisitor { if v.len() == 4 { match hex::decode(v) { Ok(n) => Ok(UID(n[0], n[1])), - Err(_) => panic!() + Err(_) => Err(serde::de::Error::custom("Could not decode hex")) } } else { - panic!() + Err(serde::de::Error::custom("ID must be a 2 byte hex string \'0000\'-\"FFFF\"")) } } else { - panic!() + Err(serde::de::Error::custom("Invalid characters in string")) } } } |