diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-21 17:09:10 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-21 17:09:10 -0800 |
commit | c1c01caf6b40343bd876e10961829e2b15a9c37c (patch) | |
tree | cb26627fe194cbd878ad9c5912dce2feef2c1c8d /rust/src/lib.rs | |
parent | 86f37a5df6f94d7736be736d0a440ae65425d6c9 (diff) | |
download | fatcat-c1c01caf6b40343bd876e10961829e2b15a9c37c.tar.gz fatcat-c1c01caf6b40343bd876e10961829e2b15a9c37c.zip |
verify checksum against regexes
Diffstat (limited to 'rust/src/lib.rs')
-rw-r--r-- | rust/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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") |