use std::io::Error as IOError;
use ExpressionError;
quick_error! {
#[derive(Debug)]
pub enum Error {
UnpairedBrackets {
display(r#"Unpaired brackets. you may have symtax like {{ {{ , if you really want that, you should write \{{ \{{"#)
}
ExpectIf {
display("Expect `if` keyword but the given isn't.")
}
CanNotClose {
display("Can not close this node.")
}
UnexpectedNode {
display("Found unexpected node.")
}
Io(error: IOError) {
from()
}
Expression(error: ExpressionError) {
from()
}
CanNotRender {
display("Can not render this node.")
}
ExpectArrayOrObject {
display("Expect array or object but the given isn't.")
}
ExpectedBoolean {
display("Expect boolean but the given isn't.")
}
InvalidSetBlock {
display("Invalid `set` block.")
}
InvalidForBlock {
display("Invalid `for` block")
}
}
}