Documentation
¶
Index ¶
- Variables
- func Break() error
- func Continue() error
- func Error(pos lexer.Position, err error) error
- func Errorf(pos lexer.Position, f string, a ...interface{}) error
- func IsBreak(err error) bool
- func IsContinue(err error) bool
- func IsError(err error) bool
- func IsNoFieldErr(err error) bool
- func IsReturn(err error) bool
- func IsVisitorExit(err error) bool
- func IsVisitorStop(err error) bool
- func NewReturn(v interface{}) error
- func NoField(pos lexer.Position, v interface{}, n string) error
- type NoFieldError
- type ReturnError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // VisitorExit is an error which will terminate the Visitor. // This is the same as any error occurring within a Visitor except that the final error // returned from specific handlers will become nil. VisitorExit = errors.New("visitor exit") // VisitorStop is an error which causes the current step in a Visitor to stop processing. // It's used to enable a Visitor to handle all processing of a node within itself rather // than the Visitor proceeding to any child nodes of that node. VisitorStop = errors.New("visitor stop") )
Functions ¶
func Error ¶
Error wraps an error with the lexer.Position. If IsError(err) returns true then that error is returned. If err is nil then nil is returned. IsError will return true for a non-nil result from this function.
func Errorf ¶
Errorf returns an error containing the lexer.Position and the formatted message. IsError with this error will return true.
func IsContinue ¶
IsContinue returns true if err is from a continue instruction being invoked.
func IsNoFieldErr ¶
func IsVisitorExit ¶
IsVisitorExit returns true if err is VisitorExit
func IsVisitorStop ¶
IsVisitorStop returns true if err is VisitorStop
Types ¶
type NoFieldError ¶
type NoFieldError struct {
// contains filtered or unexported fields
}
func GetNoFieldErr ¶
func GetNoFieldErr(err error) (*NoFieldError, bool)
func (*NoFieldError) Error ¶
func (e *NoFieldError) Error() string
func (*NoFieldError) Name ¶
func (e *NoFieldError) Name() string
func (*NoFieldError) Value ¶
func (e *NoFieldError) Value() interface{}
type ReturnError ¶
type ReturnError struct {
// contains filtered or unexported fields
}
func (*ReturnError) Error ¶
func (r *ReturnError) Error() string
func (*ReturnError) Value ¶
func (r *ReturnError) Value() interface{}
Click to show internal directories.
Click to hide internal directories.