src/api2/admin/datastore/backup.rs: improve error message

This commit is contained in:
Dietmar Maurer 2019-05-22 07:43:54 +02:00
parent 11867a2b54
commit d0afeaa831

View File

@ -267,7 +267,7 @@ fn dynamic_append (
let env: &BackupEnvironment = rpcenv.as_ref(); let env: &BackupEnvironment = rpcenv.as_ref();
let digest = crate::tools::hex_to_digest(digest_str)?; let digest = crate::tools::hex_to_digest(digest_str)?;
let size = env.lookup_chunk(&digest).ok_or_else(|| format_err!("no such chunk"))?; let size = env.lookup_chunk(&digest).ok_or_else(|| format_err!("no such chunk {}", digest_str))?;
env.dynamic_writer_append_chunk(wid, size, &digest)?; env.dynamic_writer_append_chunk(wid, size, &digest)?;