Enum ErrorKind
#[non_exhaustive]
pub enum ErrorKind
All the kind of errors Tera can produce. Non-exhaustive so we can add more if needed without a breaking change.
Variants
-
Msg(String) Generic error
-
SyntaxError(Box<ReportError>) Both lexer and parser errors. Will point to the source file
-
RenderingError(Box<ReportError>) An error that happens while rendering a template. Will point to the source file
-
CircularExtend { tpl: String, inheritance_chain: Vec<String> } A loop was found while looking up the inheritance chain
-
CircularInclude { tpl: String, include_chain: Vec<String> } A loop was found while following
{% include %}calls between templates-
MissingParent { current: String, parent: String } A template is extending a template that wasn't found in the Tera instance
-
TemplateNotFound(String) A template was missing
-
ComponentNotFound(String) A component was missing Only raised if you're trying to render a specific component
-
InvalidArgument { expected_type: String, actual_type: String } A filter/test main value was not the expected type
-
MissingArgument { arg_name: String } A function/test/filter was expecting an argument but it wasn't found
-
OutOfRangeArgument { value: String, target_type: String } A numeric argument had the right type but did not fit in the target type
-
Io(ErrorKind) An IO error occurred
-
Utf8Conversion UTF-8 conversion error when converting output to UTF-8
This should not occur unless invalid UTF8 chars are rendered
Trait Implementations
impl Clone for ErrorKind
fn clone(&self) -> Self
impl Debug for ErrorKind
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for ErrorKind
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for ErrorKind
impl PartialEq for ErrorKind
fn eq(&self, other: &Self) -> bool