-
Notifications
You must be signed in to change notification settings - Fork 54
Description
The error message when attempting to cut into a directory (to make sure all the slice is correct) is a bit confusing. When running: chisel cut --release=./ --root=mych libgcc-14-dev_libs i get error: cannot extract from package "base-files": target directory does not exist which gives me the full error hierarchy and points towards something wrong with the base-files, while the actual issue is that the directory mych does not exist.
As a UX feedback; I'd suggest caching this case and creating a more user friendly error. At least I'd present just the bottom error, and maybe even add the directory name. Something like cannot cut into mych directory. it does not exist.
I imagine this kind of treatment might be appropriate for some other errors, therefore my suggestion for reporting errors to the user would be to:
- allow the error to propagate to the topmost level normally - exactly as it is implemented at the moment
- just before passing the error to the user, check whether it is a special error which can be made more user friendly.
- Yes: report it like that
- No: Report it using the
I'm thinking of something along the lines of github.com/pkg/errors used to do?
When I have some time I'm happy to look at the code and make a PR.