Documentation ¶
Index ¶
- func ThrowFilterArgumentError(fname, format string, args ...any)
- func ThrowSyntaxError(token *Token, format string, args ...any)
- func ThrowTemplateAssertionError(fname, format string, args ...any)
- func ThrowTemplateRuntimeError(format string, args ...any)
- func ThrowUndefinedError(varName, hint string)
- type FilterArgumentError
- type TemplateAssertionError
- type TemplateError
- type TemplateLoadError
- type TemplateNotFoundError
- type TemplateRuntimeError
- type TemplateSyntaxError
- type TemplatesNotFoundError
- type Token
- type UndefinedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ThrowFilterArgumentError ¶
ThrowFilterArgumentError throws a filter argument error.
func ThrowSyntaxError ¶
ThrowSyntaxError throws a syntax error.
func ThrowTemplateAssertionError ¶
ThrowTemplateAssertionError throws a filter argument error.
func ThrowTemplateRuntimeError ¶
ThrowTemplateRuntimeError throws a generic template runtime error.
func ThrowUndefinedError ¶
func ThrowUndefinedError(varName, hint string)
ThrowUndefinedError throws an undefined error.
Types ¶
type FilterArgumentError ¶
type FilterArgumentError interface { TemplateRuntimeError FilterName() string }
FilterArgumentError is thrown when a filter is called with invalid arguments.
type TemplateAssertionError ¶
type TemplateAssertionError interface { TemplateSyntaxError TemplateAssertionError() }
TemplateAssertionError is thrown when a filter is called with invalid arguments.
type TemplateError ¶
type TemplateError interface { error TemplateError() }
TemplateError is a generic template error.
type TemplateLoadError ¶
type TemplateLoadError interface { TemplateError TemplateLoadError() Name() string }
TemplateLoadError is thrown when a template cannot be loaded.
func NewTemplateLoadError ¶
func NewTemplateLoadError(name, format string, args ...any) TemplateLoadError
NewTemplateLoadError creates a new TemplateLoadError.
type TemplateNotFoundError ¶
type TemplateNotFoundError interface { TemplateError TemplateNotFoundError() Name() string }
TemplateNotFoundError is thrown when a filter is called with invalid arguments.
func NewTemplateNotFoundError ¶
func NewTemplateNotFoundError(name string) TemplateNotFoundError
NewTemplateNotFoundError creates a new TemplateNotFoundError.
type TemplateRuntimeError ¶
type TemplateRuntimeError interface { TemplateError TemplateRuntimeError() Enrich(*Token) Token() *Token }
TemplateRuntimeError is a generic runtime error. It is used as a base for other more specific runtime errors.
func NewTemplateRuntimeError ¶
func NewTemplateRuntimeError(format string, args ...any) TemplateRuntimeError
NewTemplateRuntimeError creates a new TemplateRuntimeError.
type TemplateSyntaxError ¶
type TemplateSyntaxError interface { TemplateError TemplateSyntaxError() Pos() int }
TemplateSyntaxError is thrown when a filter is called with invalid arguments.
type TemplatesNotFoundError ¶
type TemplatesNotFoundError interface { TemplateError TemplatesNotFoundError() Names() []string }
TemplatesNotFoundError is thrown when a filter is called with invalid arguments.
type UndefinedError ¶
type UndefinedError interface { TemplateRuntimeError VariableName() string }
UndefinedError is thrown when an action is performed on an undefined variable.