builderrors

package
v0.405.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsTerminalError

func ContainsTerminalError(errs []Error) bool

func SortErrorsByPosition

func SortErrorsByPosition(merr []Error)

Types

type Error

type Error struct {
	Type  ErrorType
	Msg   string
	Pos   optional.Option[Position]
	Level ErrorLevel
}

func Errorf

func Errorf(pos Position, format string, args ...any) Error

func Infof

func Infof(pos Position, format string, args ...any) Error

func Warnf

func Warnf(pos Position, format string, args ...any) Error

func Wrapf

func Wrapf(pos Position, endColumn int, err error, format string, args ...any) Error

func (Error) Error

func (e Error) Error() string

type ErrorLevel

type ErrorLevel int
const (
	INFO ErrorLevel = iota
	WARN
	ERROR
)

type ErrorType added in v0.388.0

type ErrorType int
const (
	// FTL errors are errors that are generated by the FTL runtime or the language plugin.
	FTL ErrorType = iota
	// COMPILER errors are errors that are generated by the compiler itself.
	// LSP integration will not show these errors as they will be generated by the compiler.
	COMPILER
)

type Position

type Position struct {
	Filename    string
	Offset      int
	StartColumn int
	EndColumn   int
	Line        int
}

func (Position) String

func (p Position) String() string

Jump to

Keyboard shortcuts

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