You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
523B

  1. #![allow(unused_doc_comment)]
  2. #[macro_use]
  3. extern crate error_chain;
  4. extern crate tera;
  5. extern crate toml;
  6. error_chain! {
  7. errors {}
  8. links {
  9. Tera(tera::Error, tera::ErrorKind);
  10. }
  11. foreign_links {
  12. Io(::std::io::Error);
  13. Toml(toml::de::Error);
  14. }
  15. }
  16. // So we can use bail! in all other crates
  17. #[macro_export]
  18. macro_rules! bail {
  19. ($e:expr) => {
  20. return Err($e.into());
  21. };
  22. ($fmt:expr, $($arg:tt)+) => {
  23. return Err(format!($fmt, $($arg)+).into());
  24. };
  25. }