Enum watchexec::error::RuntimeError
source · [−]#[non_exhaustive]
pub enum RuntimeError {
Show 20 variants
Exit,
External(Box<dyn Error + Send + Sync>),
IoError {
about: &'static str,
err: Error,
},
FsWatcherCreate {
kind: Watcher,
err: Error,
},
FsWatcherEvent {
kind: Watcher,
err: Error,
},
FsWatcherPathAdd {
path: PathBuf,
kind: Watcher,
err: Error,
},
FsWatcherPathRemove {
path: PathBuf,
kind: Watcher,
err: Error,
},
InternalSupervisor(String),
EventChannelSend {
ctx: &'static str,
err: SendError<Event>,
},
EventChannelTrySend {
ctx: &'static str,
err: TrySendError<Event>,
},
Handler {
ctx: &'static str,
err: String,
},
HandlerLockHeld(&'static str),
Process(Error),
ProcessDeadOnArrival,
UnsupportedSignal(SubSignal),
Clearscreen(Error),
GlobsetGlob {
file: Option<PathBuf>,
err: Error,
},
IgnoreFileRead {
file: PathBuf,
err: Error,
},
Filterer {
kind: &'static str,
err: Box<dyn Error + Send + Sync>,
},
Set(Vec<RuntimeError>),
}
Expand description
Errors which may be recoverable, transient, or only affect a part of the operation, and should be reported to the user and/or acted upon programatically, but will not outright stop watchexec.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Exit
Pseudo-error used to signal a graceful exit.
External(Box<dyn Error + Send + Sync>)
For custom runtime errors.
This should be used for errors by external code which are not covered by the other error types; watchexec-internal errors should never use this.
IoError
Generic I/O error, with some context.
FsWatcherCreate
Error received when creating a filesystem watcher fails.
FsWatcherEvent
Fields
kind: Watcher
The kind of watcher that failed to read an event.
err: Error
The underlying error.
Error received when reading a filesystem event fails.
FsWatcherPathAdd
Fields
path: PathBuf
The path that was attempted to be added.
kind: Watcher
The kind of watcher that failed to add a path.
err: Error
The underlying error.
Error received when adding to the pathset for the filesystem watcher fails.
FsWatcherPathRemove
Fields
path: PathBuf
The path that was attempted to be removed.
kind: Watcher
The kind of watcher that failed to remove a path.
err: Error
The underlying error.
Error received when removing from the pathset for the filesystem watcher fails.
InternalSupervisor(String)
Opaque internal error from a command supervisor.
EventChannelSend
Fields
ctx: &'static str
The context in which this error happened.
This is not stable and its value should not be relied on except for printing the error.
Error received when an event cannot be sent to the event channel.
EventChannelTrySend
Fields
ctx: &'static str
The context in which this error happened.
This is not stable and its value should not be relied on except for printing the error.
err: TrySendError<Event>
The underlying error.
Error received when an event cannot be sent to the event channel.
Handler
Fields
ctx: &'static str
The context in which this error happened.
This is not stable and its value should not be relied on except for printing the error.
err: String
The underlying error, as the Display representation of the original error.
Error received when a Handler
errors.
The error is completely opaque, having been flattened into a string at the error point.
HandlerLockHeld(&'static str)
Error received when a Handler
which has been passed a lock has kept that lock open after the handler has completed.
Process(Error)
Error received when operating on a process.
ProcessDeadOnArrival
Error received when a process did not start correctly, or finished before we could even tell.
UnsupportedSignal(SubSignal)
Error received when a SubSignal
is unsupported
This may happen if the signal is not supported on the current platform, or if Watchexec doesn’t support sending the signal.
Clearscreen(Error)
Error received when clearing the screen.
GlobsetGlob
Error received when parsing a glob (possibly from an IgnoreFile
) fails.
IgnoreFileRead
Error received when an IgnoreFile
cannot be read.
Filterer
Fields
kind: &'static str
The kind of filterer that failed.
This should be set by the filterer itself to a short name for the filterer.
This is not stable and its value should not be relied on except for printing the error.
Error emitted by a Filterer
.
With built-in filterers this will probably be a dynbox of
TaggedFiltererError
, but it is
possible to use a custom filterer which emits a different error type.
Set(Vec<RuntimeError>)
A set of related RuntimeError
s.
Trait Implementations
Unique diagnostic code that can be used to look up more information
about this Diagnostic. Ideally also globally unique, and documented in
the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz
) is recommended, but more classic codes like
E0123
or Enums will work just fine. Read more
Additional help text related to this Diagnostic. Do you have any advice for the poor soul who’s just run into this issue? Read more
Additional related Diagnostics.
Diagnostic severity. This may be used by [ReportHandler]s to change the display format of this diagnostic. Read more
URL to visit for a more detailed explanation/help about this Diagnostic.
Source code to apply this Diagnostic’s Diagnostic::labels to.
Labels to apply to this Diagnostic’s Diagnostic::source_code
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl !UnwindSafe for RuntimeError
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more