error.rs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // imag - the personal information management suite for the commandline
  3. // Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
  4. //
  5. // This library is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU Lesser General Public
  7. // License as published by the Free Software Foundation; version
  8. // 2.1 of the License.
  9. //
  10. // This library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public
  16. // License along with this library; if not, write to the Free Software
  17. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. //
  19. generate_error_module!(
  20. generate_error_types!(LinkError, LinkErrorKind,
  21. EntryHeaderReadError => "Error while reading an entry header",
  22. EntryHeaderWriteError => "Error while writing an entry header",
  23. ExistingLinkTypeWrong => "Existing link entry has wrong type",
  24. LinkTargetDoesNotExist => "Link target does not exist in the store",
  25. LinkParserError => "Link cannot be parsed",
  26. LinkParserFieldMissingError => "Link cannot be parsed: Field missing",
  27. LinkParserFieldTypeError => "Link cannot be parsed: Field type wrong",
  28. InternalConversionError => "Error while converting values internally",
  29. InvalidUri => "URI is not valid",
  30. StoreReadError => "Store read error",
  31. StoreWriteError => "Store write error",
  32. StoreIdError => "StoreId handling error"
  33. );
  34. );
  35. pub use self::error::LinkError;
  36. pub use self::error::LinkErrorKind;
  37. pub use self::error::MapErrInto;