scribe/
errors.rs

1error_chain! {
2    errors {
3        EmptyWorkspace {
4            description("the workspace is empty")
5            display("the workspace is empty")
6        }
7        MissingPath {
8            description("buffer doesn't have a path")
9            display("buffer doesn't have a path")
10        }
11        MissingScope {
12            description("couldn't find any scopes at the cursor position")
13            display("couldn't find any scopes at the cursor position")
14        }
15        MissingSyntax {
16            description("no syntax definition for the current buffer")
17            display("no syntax definition for the current buffer")
18        }
19    }
20
21    foreign_links {
22        Io(::std::io::Error) #[cfg(unix)];
23        ParsingError(syntect::parsing::ParsingError);
24        ScopeError(syntect::parsing::ScopeError);
25        SyntaxLoadingError(syntect::LoadingError);
26    }
27}