errusr

package
v0.0.0-...-d0f7b5f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package errusr wraps user errors with token position information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(p token.Poser, s string) error

New creates a new user error from a string.

func Newf

func Newf(p token.Poser, spec string, vs ...interface{}) error

Newf creates a new formatted user error.

func Wrap

func Wrap(p token.Poser, err error) error

Wrap an error with the position information in p.

Wrapping io.EOF changes the error to io.ErrUnexpectedEOF.

Types

type User

type User struct {
	// contains filtered or unexported fields
}

User represents an error related to the input script.

func (User) Error

func (u User) Error() string

func (User) Unwrap

func (u User) Unwrap() error

Unwrap returns the original error.

Jump to

Keyboard shortcuts

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