From c1c01caf6b40343bd876e10961829e2b15a9c37c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 21 Dec 2018 17:09:10 -0800 Subject: verify checksum against regexes --- rust/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rust/src/lib.rs') diff --git a/rust/src/lib.rs b/rust/src/lib.rs index b7f1817a..0bed3471 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -49,7 +49,11 @@ pub mod errors { } MalformedExternalId(id: String) { description("external identifier doesn't match required pattern") - display("external identifier doesn't match required pattern") + display("external identifier doesn't match required pattern: {}", id) + } + MalformedChecksum(hash: String) { + description("checksum doesn't match required pattern (hex encoding)") + display("checksum doesn't match required pattern (hex encoding): {}", hash) } NotInControlledVocabulary(word: String) { description("word or type not correct for controlled vocabulary") -- cgit v1.2.3