You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #94 we wound up wanting to build better errors for some cases, one of them is this FinalError:
builder.append_file(path, file.file_mut()).map_err(|err| {FinalError::with_title("Could not create archive").detail("Unexpected error while trying to read file").detail(format!("Error: {}.", err)).into_owned()})?;
It isn't a great error message since it doesn't tell you which file broke, in a scenario where you are compressing/decompressing multiple files this could be an issue.
Now, it is troublesome to insert the output_file, since it was inserted on the tar writer from it's generic call. This is a problem because:
It seems that the Writer object does not have a getter to the output_path where it intends to write stuff, so we can't get this information from it.
So we would end up trying to pass output_path on the function? Maybe, but since it's a generic call we would need to reproduce it to the zip call aswell I think.
So... I can't see a clear path of action, and this is already a hard error to occur aswell, therefore I will put the discussion tag and the low-priority one
The text was updated successfully, but these errors were encountered:
That sounds ideal, you're saying that if the error breaks inside tar or zip modules, it can propagate the error upwards and then the calling method can finish annotating context? I like that
marcospb19
changed the title
Better error for could not create archive - append the failing output path
Display path where error "Could not create archive" occurred
Nov 10, 2021
While working on #94 we wound up wanting to build better errors for some cases, one of them is this FinalError:
It isn't a great error message since it doesn't tell you which file broke, in a scenario where you are compressing/decompressing multiple files this could be an issue.
Now, it is troublesome to insert the output_file, since it was inserted on the tar writer from it's generic call. This is a problem because:
So... I can't see a clear path of action, and this is already a hard error to occur aswell, therefore I will put the discussion tag and the low-priority one
The text was updated successfully, but these errors were encountered: