Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Lexer errors ErrFailedToReadContent = fmt.Errorf("failed to read content") SyntaxError = fmt.Errorf("syntax error") // Runtime errors RuntimeError = fmt.Errorf("runtime error") ValueError = fmt.Errorf("%w: value error", RuntimeError) CannotRedeclareVariable = fmt.Errorf("%w: cannot redeclare variable", RuntimeError) VariableNotDeclared = fmt.Errorf("%w: variable not declared", RuntimeError) CannotReassignConstant = fmt.Errorf("%w: cannot reassign constant", RuntimeError) CannotAccessVariable = fmt.Errorf("%w: cannot access variable", RuntimeError) CannotRedecareFunction = fmt.Errorf("%w: cannot redeclare function", RuntimeError) CannotReUseNamespace = fmt.Errorf("%w: cannot reuse namespace", RuntimeError) CannotAccessNamespace = fmt.Errorf("%w: cannot access namespace", RuntimeError) CannotAccessFunction = fmt.Errorf("%w: cannot access function", RuntimeError) InvalidArguments = fmt.Errorf("%w: invalid arguments", RuntimeError) IndexOutOfRange = fmt.Errorf("%w: index out of range", RuntimeError) CannotReassignDefinition = fmt.Errorf("%w: cannot reassign definition", RuntimeError) ThisNotInMethod = fmt.Errorf("%w: 'this' cannot be used outside a definition", RuntimeError) )
Functions ¶
Types ¶
type DebugError ¶
type DebugError struct {
// contains filtered or unexported fields
}
DebugError is an error with debug information
func (DebugError) Error ¶
func (de DebugError) Error() string
Error returns the error message with debug information
func (DebugError) GetColumn ¶
func (de DebugError) GetColumn() int
func (DebugError) GetFile ¶
func (de DebugError) GetFile() string
func (DebugError) GetLine ¶
func (de DebugError) GetLine() int
func (DebugError) GetParentError ¶
func (de DebugError) GetParentError() error
func (DebugError) HttpError ¶
func (de DebugError) HttpError() *HtmlError
HttpError returns the error message with debug information for HTTP
type HtmlError ¶
type HtmlError struct { Code []byte // contains filtered or unexported fields }
HtmlError is an error with HTML debug information
func NewHtmlError ¶
func NewHtmlError(de *DebugError) *HtmlError
NewHtmlError creates a new HtmlError
func (*HtmlError) Debug ¶
func (he *HtmlError) Debug() *DebugError
Click to show internal directories.
Click to hide internal directories.