From deedfcdc3504d19fa6e40b2577868ba4ab19d3f7 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 22 Feb 2021 17:20:00 +0000 Subject: [PATCH] vmm: Improve restore error message about URL conversion Signed-off-by: Rob Bradford --- vmm/src/memory_manager.rs | 3 ++- vmm/src/migration.rs | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vmm/src/memory_manager.rs b/vmm/src/memory_manager.rs index 64508f448..76e64bbe8 100644 --- a/vmm/src/memory_manager.rs +++ b/vmm/src/memory_manager.rs @@ -2032,7 +2032,8 @@ impl Transportable for MemoryManager { .to_file_path() .map_err(|_| { MigratableError::MigrateSend(anyhow!( - "Could not convert file URL to a file path" + "Could not convert file URL to a file path: {}", + destination_url )) }) .and_then(|path| { diff --git a/vmm/src/migration.rs b/vmm/src/migration.rs index 6f2e7bc1b..e68f81f97 100644 --- a/vmm/src/migration.rs +++ b/vmm/src/migration.rs @@ -17,7 +17,10 @@ pub fn url_to_path(url: &Url) -> std::result::Result { "file" => url .to_file_path() .map_err(|_| { - MigratableError::MigrateSend(anyhow!("Could not convert file URL to a file path")) + MigratableError::MigrateSend(anyhow!( + "Could not convert file URL to a file path: {}", + url.as_str() + )) }) .and_then(|path| { if !path.is_dir() {