-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework error handling in mdbook-spec
This enhances mdbook-spec's error handling with multiple changes: - Several errors are now conditionally warnings. This makes doing local development with `mdbook serve` much easier, as sometimes you are OK with temporarily having broken links. SPEC_DENY_WARNINGS still rejects these. - Collect multiple errors, and display all of them, instead of bailing on the very first error. - Show a count of the number of warnings or errors. This is done by introducing a new `Diagnostics` struct for emitting warnings and errors. The `warn_or_err!` macro provide the primary interface for emitting warnings. I also added a `bug!` macro for internal errors that will immediately exit. This is slightly nicer output than using `panic!`.
- Loading branch information
Showing
3 changed files
with
125 additions
and
72 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
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
Oops, something went wrong.