Pretty-print runtime errors
This commit is contained in:
parent
427e4a0d08
commit
c6f230a168
|
@ -1,7 +1,7 @@
|
|||
use std::convert::Infallible;
|
||||
|
||||
use clap::ArgMatches;
|
||||
use miette::Result;
|
||||
use miette::{Report, Result};
|
||||
use tracing::error;
|
||||
use watchexec::{config::InitConfig, error::RuntimeError, handler::SyncFnHandler};
|
||||
|
||||
|
@ -22,10 +22,10 @@ pub fn init(_args: &ArgMatches<'static>) -> Result<InitConfig> {
|
|||
|
||||
if cfg!(debug_assertions) {
|
||||
eprintln!("[[{:?}]]", data);
|
||||
} else {
|
||||
eprintln!("[[{}]]", data);
|
||||
}
|
||||
|
||||
eprintln!("[[Error (not fatal)]]\n{}", Report::new(data));
|
||||
|
||||
Ok(())
|
||||
},
|
||||
));
|
||||
|
|
Loading…
Reference in New Issue