errors

package
v0.0.0-...-6b9ac5a Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: AGPL-3.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidAST = iota
	InvalidCommand
	Friendly
	Unexpected = 999
)

Variables

This section is empty.

Functions

func New

func New(text string) error

New creates a new simple error

func Newf

func Newf(text string, a ...interface{}) error

Newf creates a new simple error with fmt.Sprintf

Types

type DicelangError

type DicelangError struct {
	Err   string
	Code  int32
	Inner error
}

DicelangError represents a custom error thrown by Dicelang

func NewDicelangError

func NewDicelangError(text string, code int32, inner error) *DicelangError

NewDicelangError creates a new DiceLangError

func (DicelangError) Error

func (e DicelangError) Error() string

Error returns the message string

type LexError

type LexError struct {
	Err  string
	Col  int
	Line int
}

LexError represents an error occured during parsing of a dicelang statement.

func NewLexError

func NewLexError(text string, col int, line int) *LexError

NewLexError creates a new LexError

func (LexError) Error

func (e LexError) Error() string

Error returns the message string

Jump to

Keyboard shortcuts

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