Documentation ¶
Overview ¶
Package errz defines a FriendlyError interface for errors that have a human friendly message in addition to the default error message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreTypeErrorsFatal ¶ added in v1.7.0
func AreTypeErrorsFatal() bool
AreTypeErrorsFatal returns whether type errors are considered fatal.
func SetTypeErrorsAreFatal ¶ added in v1.7.0
func SetTypeErrorsAreFatal(fatal bool)
SetTypeErrorsAreFatal sets whether type errors should be considered fatal.
Types ¶
type ArgsError ¶ added in v1.7.0
type ArgsError struct {
Err error
}
ArgsError is used to indicate an error that occurred while processing function arguments. All ArgsErrors are considered fatal errors. This should be reserved for use in cases where a function call basically should not compile due to the number of arguments passed.
func ArgsErrorf ¶ added in v1.7.0
func NewArgsError ¶ added in v1.7.0
type EvalError ¶ added in v1.7.0
type EvalError struct {
Err error
}
EvalError is used to indicate an unrecoverable error that occurred during program evaluation. All EvalErrors are considered fatal errors.
func EvalErrorf ¶ added in v1.7.0
func NewEvalError ¶ added in v1.7.0
type FriendlyError ¶
FriendlyError is an interface for errors that have a human friendly message in addition to a the lower level default error message.
type TypeError ¶ added in v1.7.0
type TypeError struct { Err error // contains filtered or unexported fields }
TypeError is used to indicate an invalid type was supplied. These may or may not be fatal errors depending on typeErrorsAreFatal setting.