Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression in unmatched globs error message (#10595)
Fixes #10574. We were calling `throw(&format("{:?}"))` on an error that was already had type `Failure`, meaning that we were converting a `Failure` to a `String`, then back to a `Failure`, which resulted in an overly chatty error message. This also fixes error messages involving `DownloadFile`. Before: ``` Exception: Throw { val: Unmatched glob from file arguments: "fake", python_traceback: "Traceback (no traceback):\n <pants native internals>\nException: Unmatched glob from file arguments: \"fake\"", engine_traceback: ["Snapshotting: PathGlobs(globs=(\'fake\',), glob_match_error_behavior=<GlobMatchErrorBehavior.error: \'error\'>, conjunction=<GlobExpansionConjunction.all_match: \'all_match\'>, description_of_origin=\'file arguments\')"] } ``` After: ``` Unmatched glob from file arguments: "fake" ``` [ci skip-build-wheels]
- Loading branch information
1 parent
26e5007
commit bb9b53c
Showing
1 changed file
with
28 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters