Configure miette docsurl globally per error type

This commit is contained in:
Félix Saparelli 2022-01-12 00:53:25 +13:00
parent 9527202c51
commit 31cbe69051
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474

View File

@ -19,6 +19,7 @@ use crate::{
/// Errors which are not recoverable and stop watchexec execution. /// Errors which are not recoverable and stop watchexec execution.
#[derive(Debug, Diagnostic, Error)] #[derive(Debug, Diagnostic, Error)]
#[non_exhaustive] #[non_exhaustive]
#[diagnostic(url(docsrs))]
pub enum CriticalError { pub enum CriticalError {
/// Pseudo-error used to signal a graceful exit. /// Pseudo-error used to signal a graceful exit.
#[error("this should never be printed (exit)")] #[error("this should never be printed (exit)")]
@ -65,6 +66,7 @@ pub enum CriticalError {
/// be reported to the user and/or acted upon programatically, but will not outright stop watchexec. /// be reported to the user and/or acted upon programatically, but will not outright stop watchexec.
#[derive(Debug, Diagnostic, Error)] #[derive(Debug, Diagnostic, Error)]
#[non_exhaustive] #[non_exhaustive]
#[diagnostic(url(docsrs))]
pub enum RuntimeError { pub enum RuntimeError {
/// Pseudo-error used to signal a graceful exit. /// Pseudo-error used to signal a graceful exit.
#[error("this should never be printed (exit)")] #[error("this should never be printed (exit)")]
@ -246,6 +248,7 @@ pub enum RuntimeError {
/// Errors occurring from reconfigs. /// Errors occurring from reconfigs.
#[derive(Debug, Diagnostic, Error)] #[derive(Debug, Diagnostic, Error)]
#[non_exhaustive] #[non_exhaustive]
#[diagnostic(url(docsrs))]
pub enum ReconfigError { pub enum ReconfigError {
/// Error received when the action processor cannot be updated. /// Error received when the action processor cannot be updated.
#[error("reconfig: action watch: {0}")] #[error("reconfig: action watch: {0}")]