Documentation ¶
Index ¶
- func Print(w io.Writer, err error)
- type Bailout
- type List
- func (l *List) Abort()
- func (l *List) Add(pos token.Pos, msg string)
- func (l *List) AddRaw(err *scanner.Error)
- func (l *List) Addf(pos token.Pos, format string, args ...interface{})
- func (l *List) Err() error
- func (l *List) Error() string
- func (l *List) HandleBailout(err *error)
- func (l *List) Len() int
- func (l *List) MakeRelative(root, relwd string)
- func (l *List) Merge(other *List)
- func (l *List) Sort()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bailout ¶
type Bailout struct {
// contains filtered or unexported fields
}
Bailout is a sentinel type for panics that indicate to immediately stop processing because too many errors have been found. It can conveniently be handled by HandleBailout.
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) Add ¶
Add adds an error to the list.
If too many errors have been added it panics with a Bailout value to abort processing. Use HandleBailout to conveniently handle this.
func (*List) AddRaw ¶
AddRaw adds a raw *scanner.Error to the list.
If too many errors have been added it panics with a Bailout value to abort processing. Use HandleBailout to conveniently handle this.
func (*List) Err ¶
Err returns an error equivalent to this error list. If the list is empty, Err returns nil.
func (*List) HandleBailout ¶
HandleBailout handles bailouts raised by (*List).Add and family when too many errors have been found.
func (*List) MakeRelative ¶
MakeRelative rewrites the errors by making filenames within the app root relative to the relwd (which must be a relative path within the root).