Skip to content

Commit

Permalink
config: Consolidate error reporting.
Browse files Browse the repository at this point in the history
This modifies the initial configuration error handling logic to match
dcrd.  In particular, the logic is modified to avoid a bunch of
duplicate code and fix some cases that were not logging the errors as
expected.

It accomplishes this by consolidating the error reporting in a single
place in the caller and introducing a custom error type which signals
that the usage message should be suppressed in order to retain the
primary behavior the originally was the reason for the prints being in
the config function to begin with.

Also, the application name is passed into the function now since it is
needed in both places.
  • Loading branch information
davecgh authored and jholdstock committed Sep 12, 2023
1 parent 433a31b commit 7344dcc
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 142 deletions.
Loading

0 comments on commit 7344dcc

Please sign in to comment.