chiark / gitweb /
spec: LibraryItemNotFound: Actually report the ItemSpec
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 May 2022 14:43:55 +0000 (15:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 May 2022 14:54:56 +0000 (15:54 +0100)
This error message was hopeless.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/spec.rs

index 0623ac333e73787fba0f9f83b383cfa0d9421d48..b259cbf1d94134f383c19cde404ca9609ffa6df1 100644 (file)
@@ -70,7 +70,7 @@ pub enum SpecError {
   #[error("internal error: {0}")]            InternalError(String),
   #[error("specified position is off table")] PosOffTable,
   #[error("library not found")]              LibraryNotFound,
-  #[error("item not found in library")]      LibraryItemNotFound(ItemSpec),
+  #[error("item not found in library: {0:?}")] LibraryItemNotFound(ItemSpec),
   #[error("acl contains invalid account glob")] AclInvalidAccountGlob,
   #[error("acl entry allow/deny overlap")]   AclEntryOverlappingAllowDeny,
   #[error("inconsistent piece count")]       InconsistentPieceCount,