1use error_chain::error_chain;
6 Clap(::clap::Error) #[cfg(feature = "application")];
8 SyntectError(::syntect::LoadingError);
9 ParseIntError(::std::num::ParseIntError);
10 GlobParsingError(::globset::Error);
11 SerdeYamlError(::serde_yaml::Error);
15pub fn default_error_handler(error: &Error, output: &mut dyn Write) {
16 use ansi_term::Colour::Red;
19 Error(ErrorKind::Io(ref io_error), _)
20 if io_error.kind() == ::std::io::ErrorKind::BrokenPipe =>
22 ::std::process::exit(0);
24 Error(ErrorKind::SerdeYamlError(_), _) => {
27 "{}: Error while parsing metadata.yaml file: {}",
28 Red.paint("[bat error]"),
34 writeln!(output, "{}: {}", Red.paint("[bat error]"), error).ok();
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list