~matthiasbeyer/imag

ref: f882f6eeafb4559d0b78a753561234a1c6e7a272 imag/lib/entry/libimagentryview/src/error.rs -rw-r--r-- 1.8 KiB
f882f6eeMatthias Beyer Merge pull request #1418 from matthiasbeyer/libimagentryview/pass-sink 3 years ago
                                                                                                    
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// imag - the personal information management suite for the commandline
// Copyright (C) 2015-2018 Matthias Beyer <mail@beyermatthias.de> and contributors
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; version
// 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//

error_chain! {
    types {
        ViewError, ViewErrorKind, ResultExt, Result;
    }

    foreign_links {
        IO(::std::io::Error);
    }

    links {
        StoreError(::libimagstore::error::StoreError, ::libimagstore::error::StoreErrorKind);
    }

    errors {
        Unknown              {
            description("Unknown view error")
            display("Unknown view error")
        }

        GlobError            {
            description("Error while glob()ing")
            display("Error while glob()ing")
        }

        PatternError         {
            description("Error in glob() pattern")
            display("Error in glob() pattern")
        }

        PatternBuildingError {
            description("Could not build glob() pattern")
            display("Could not build glob() pattern")
        }

        ViewError            {
            description("Failed to start viewer")
            display("Failed to start viewer")
        }

    }
}