vmm: Improve restore error message about URL conversion

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-02-22 17:20:00 +00:00
parent 2122233047
commit deedfcdc35
2 changed files with 6 additions and 2 deletions

View File

@ -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| {

View File

@ -17,7 +17,10 @@ pub fn url_to_path(url: &Url) -> std::result::Result<PathBuf, MigratableError> {
"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() {