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 ¶
func AreTypeErrorsFatal() bool
AreTypeErrorsFatal returns whether type errors are considered fatal.
func SetTypeErrorsAreFatal ¶
func SetTypeErrorsAreFatal(fatal bool)
SetTypeErrorsAreFatal sets whether type errors should be considered fatal.
Types ¶
type ArgsError ¶
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 ¶
func NewArgsError ¶
type EvalError ¶
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 ¶
func NewEvalError ¶
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 ¶
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.