Documentation
¶
Index ¶
- Constants
- func ExactArgs(args []object.Object, n int) object.Object
- func MaxArgs(args []object.Object, n int) object.Object
- func MinArgs(args []object.Object, n int) object.Object
- func NewArgumentError(got, want int) *object.Error
- func NewCallDepthExceededError(max int) *object.Error
- func NewCancelledError() *object.Error
- func NewError(format string, args ...interface{}) *object.Error
- func NewIdentifierError(name string) *object.Error
- func NewPanicError(panicValue interface{}) *object.Error
- func NewTimeoutError() *object.Error
- func NewTypeError(expected, got string) *object.Error
- func NoArgs(args []object.Object) object.Object
- func ParameterError(name string, err object.Object) object.Object
- func RangeArgs(args []object.Object, min, max int) object.Object
Constants ¶
View Source
const ( ErrTimeout = "execution timeout" ErrCancelled = "execution cancelled" ErrDivisionByZero = "division by zero" ErrIndexOutOfRange = "index out of range" ErrKeyNotFound = "key not found" ErrTypeError = "type error" ErrArgumentError = "argument error" ErrIdentifierNotFound = "identifier not found" ErrUnknownOperator = "unknown operator" ErrImportError = "import error" ErrCallDepthExceeded = "call depth exceeded" ErrPanic = "script panic" )
Common error types
Variables ¶
This section is empty.
Functions ¶
func NewArgumentError ¶
NewArgumentError creates an argument error
func NewCallDepthExceededError ¶
NewCallDepthExceededError creates a call depth exceeded error
func NewCancelledError ¶
NewCancelledError creates a cancellation error
func NewIdentifierError ¶
NewIdentifierError creates an identifier not found error
func NewPanicError ¶
NewPanicError creates a panic error with the panic value
func NewTypeError ¶
NewTypeError creates a type error
func ParameterError ¶
ParameterError wraps an error with a parameter name for context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.