errors

package
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextError

type ContextError struct {
	Message    string
	Location   string
	LineNumber int
	Column     int
	Context    string
	Err        error
}

ContextError provides enhanced error context

func NewContextError

func NewContextError(message, location string, lineNumber int, err error) *ContextError

NewContextError creates a new context error

func (*ContextError) Error

func (e *ContextError) Error() string

Error implements the error interface

func (*ContextError) Unwrap

func (e *ContextError) Unwrap() error

Unwrap returns the underlying error

func (*ContextError) WithColumn

func (e *ContextError) WithColumn(column int) *ContextError

WithColumn adds column information to the error

func (*ContextError) WithContext

func (e *ContextError) WithContext(context string) *ContextError

WithContext adds context information to the error

type FunctionError

type FunctionError struct {
	FunctionName string
	Value        interface{}
	Args         []string
	Message      string
	Err          error
}

FunctionError represents a function-specific error

func NewFunctionError

func NewFunctionError(functionName, message string, err error) *FunctionError

NewFunctionError creates a new function error

func (*FunctionError) Error

func (e *FunctionError) Error() string

Error implements the error interface

func (*FunctionError) Unwrap

func (e *FunctionError) Unwrap() error

Unwrap returns the underlying error

type TemplateError

type TemplateError struct {
	TemplateName string
	TagName      string
	Attribute    string
	Value        string
	Message      string
	LineNumber   int
	Err          error
}

TemplateError represents a template-specific error

func NewTemplateError

func NewTemplateError(templateName, tagName, attribute, value, message string, lineNumber int, err error) *TemplateError

NewTemplateError creates a new template error

func (*TemplateError) Error

func (e *TemplateError) Error() string

Error implements the error interface

func (*TemplateError) Unwrap

func (e *TemplateError) Unwrap() error

Unwrap returns the underlying error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL