scribe/
errors.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
error_chain! {
    errors {
        EmptyWorkspace {
            description("the workspace is empty")
            display("the workspace is empty")
        }
        MissingPath {
            description("buffer doesn't have a path")
            display("buffer doesn't have a path")
        }
        MissingScope {
            description("couldn't find any scopes at the cursor position")
            display("couldn't find any scopes at the cursor position")
        }
        MissingSyntax {
            description("no syntax definition for the current buffer")
            display("no syntax definition for the current buffer")
        }
    }

    foreign_links {
        Io(::std::io::Error) #[cfg(unix)];
        ParsingError(syntect::parsing::ParsingError);
        ScopeError(syntect::parsing::ScopeError);
        SyntaxLoadingError(syntect::LoadingError);
    }
}