mirror of
https://github.com/sharkdp/bat
synced 2026-08-04 19:01:44 +00:00
Refactor HighlightingAssets::get_syntax to return Result type
This commit is contained in:
@@ -10,6 +10,17 @@ error_chain! {
|
||||
GlobParsingError(::globset::Error);
|
||||
SerdeYamlError(::serde_yaml::Error);
|
||||
}
|
||||
|
||||
errors {
|
||||
UndetectedSyntax(input: String) {
|
||||
description("unable to detect syntax"),
|
||||
display("unable to detect syntax for {}", input)
|
||||
}
|
||||
UnknownSyntax(name: String) {
|
||||
description("unknown syntax"),
|
||||
display("unknown syntax: '{}'", name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn default_error_handler(error: &Error, output: &mut dyn Write) {
|
||||
|
||||
Reference in New Issue
Block a user