2017-09-23 15:51:35 +00:00
|
|
|
//
|
|
|
|
// imag - the personal information management suite for the commandline
|
2018-02-07 01:48:53 +00:00
|
|
|
// Copyright (C) 2015-2018 Matthias Beyer <mail@beyermatthias.de> and contributors
|
2017-09-23 15:51:35 +00:00
|
|
|
//
|
|
|
|
// 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
|
|
|
|
//
|
|
|
|
|
2017-10-02 18:55:42 +00:00
|
|
|
use libimagstore::storeid::StoreId;
|
|
|
|
|
2017-09-23 15:51:35 +00:00
|
|
|
error_chain! {
|
|
|
|
types {
|
|
|
|
ContactError, ContactErrorKind, ResultExt, Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
links {
|
|
|
|
StoreError(::libimagstore::error::StoreError, ::libimagstore::error::StoreErrorKind);
|
2017-09-30 17:46:04 +00:00
|
|
|
VObjectError(::vobject::error::VObjectError, ::vobject::error::VObjectErrorKind);
|
2018-01-08 22:39:23 +00:00
|
|
|
EntryUtilError(::libimagentryutil::error::EntryUtilError, ::libimagentryutil::error::EntryUtilErrorKind);
|
2017-09-23 15:51:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
foreign_links {
|
|
|
|
Io(::std::io::Error);
|
|
|
|
TomlQueryError(::toml_query::error::Error);
|
2018-02-13 23:12:23 +00:00
|
|
|
UuidError(::uuid::ParseError);
|
2017-09-23 15:51:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
errors {
|
|
|
|
|
2017-09-23 18:24:54 +00:00
|
|
|
HeaderTypeError(ty: &'static str, loc: &'static str) {
|
|
|
|
description("Type error in header")
|
|
|
|
display("Type error in header, expected {} at '{}', found other type", ty, loc)
|
|
|
|
}
|
|
|
|
|
2017-10-02 18:55:42 +00:00
|
|
|
EntryNotFound(sid: StoreId) {
|
|
|
|
description("Entry not found with StoreId")
|
|
|
|
display("Entry {:?} not found", sid)
|
|
|
|
}
|
|
|
|
|
2018-03-12 13:43:02 +00:00
|
|
|
UidMissing(path: String) {
|
|
|
|
description("Vcard object has no UID")
|
|
|
|
display("Vcard at {:?} has no UID", path)
|
|
|
|
}
|
|
|
|
|
2017-09-23 15:51:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|