Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ledger-tool: Condense repeated error handling (#34439)
Several commands call load_and_process_ledger() which can fail in a number of ways. These callers currently all handle the result in the same way by matching the return Result: - The Ok(_) case uses the returned types as normal - The Err(_) case prints an error message and exits This error handling is redundant, and a helper could remove the duplicate code. So, this PR adds a wrapper around that checks the result and unwraps OR prints error messages and exits.
- Loading branch information