errors

package
v0.0.0-...-5957b22 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultError

type DefaultError struct {
	Error
	// contains filtered or unexported fields
}

This is for error messages that are not the easiest to pass objects into, i.e. in the case where there is a need to handle multiple parameters and they are not entirely relevant (builtin functions) A simple message to show is okay.

func NewDefaultError

func NewDefaultError(message string) DefaultError

func (DefaultError) Describe

func (de DefaultError) Describe()

type Error

type Error interface {
	Describe()
}

type RuntimeError

type RuntimeError struct {
	Error
	// contains filtered or unexported fields
}

Runtime errors will take in objects as they are taken place during the interpreting phase

func NewRuntimeError

func NewRuntimeError(obj object.Object, message string) RuntimeError

func (RuntimeError) Describe

func (re RuntimeError) Describe()

type ShadowWarning

type ShadowWarning struct {
	Error
	// contains filtered or unexported fields
}

func NewShadowWarning

func NewShadowWarning(line int, variableName string) ShadowWarning

func (ShadowWarning) Describe

func (sw ShadowWarning) Describe()

type SyntaxError

type SyntaxError struct {
	Error
	// contains filtered or unexported fields
}

Syntax errors would take in tokens as arguments as it will take place in the parsing phase

func NewSyntaxError

func NewSyntaxError(token token.Token, message string) SyntaxError

func (SyntaxError) Describe

func (se SyntaxError) Describe()

Jump to

Keyboard shortcuts

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