elvish/util/pos_error.go
2016-02-16 19:15:29 +01:00

15 lines
253 B
Go

package util
import "fmt"
// PosError is an error associated with a position range.
type PosError struct {
Begin int
End int
Err error
}
func (pe *PosError) Error() string {
return fmt.Sprintf("%d-%d: %s", pe.Begin, pe.End, pe.Err.Error())
}