errortypes

package
v0.0.0-...-c50f1b6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrFilePos

func IsErrFilePos(err error) bool

IsErrFilePos identifies whethere or not the root cause of the provided error is of the ErrFilePos type. Wrapped errors are unwrapped via the Cause() function.

func NewErrFilePosf

func NewErrFilePosf(file string, line, col int, format string, args ...interface{}) error

NewErrFilePosf creates an error conforming to the ErrFilePos interface.

Types

type ErrFilePos

type ErrFilePos interface {
	error
	File() string
	Line() int
	Col() int
}

ErrFilePos extends the error interface to add details on the file position where the error occurred.

func ToErrFilePos

func ToErrFilePos(err error) ErrFilePos

ToErrFilePos converts the input error to an ErrFilePos if possible, or nil if not. If IsErrFilePos returns true, this will not return nil.

Jump to

Keyboard shortcuts

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