Skip to main content

Squirrel Error Messages

Runtime issue warnings you may encounter

Squirrel has many runtime error types pre-programmed. They are largely self-explanatory. However, not all of the errors defined by the standard version of Squirrel are included in the imp version of the language: errors relating to files, for instance, are absent because the Electric Imp platform doesn’t support files.

Here is a list of error messages you may encounter:

  • A closure with free valiables bound cannot be serialized
  • Arith op [operator] on between [variable name] and [variable name]
  • Assertion failed
  • Attempt to call [entity]
  • Attempt to delete a slot from a [variable type]
  • Attempt to negate a [variable type]
  • Attempt to perform a bitwise op on a [variable type]
  • Bitwise op between [variable name] and [variable name]
  • Call failed
  • Cannot apply instanceof between a [entity] and a [entity]
  • Cannot clone blob
  • Cannot convert the string
  • Cannot create blob
  • Cannot create blob with negative size
  • Cannot delete a slot from [table]
  • Cannot deserialize a [variable type] (0x%x)
  • Cannot iterate a generator
  • Cannot iterate [name]
  • Cannot resize stack while in a metamethod
  • Cannot serialize a [variable type]
  • Cannot set property of object of type [variable type]
  • Cannot suspend through native calls/metamethods
  • Cannot use non-cloneable type for default parameter
  • Class instances do not support the new slot operator
  • Clear only works on table and array
  • Cloning a [type]
  • _cmp must return an integer
  • Compare function failed
  • Comparison between [variable type] and [variable type]
  • CRT API failure
  • Delegate cycle
  • Division by zero
  • Division overflow
  • Empty array
  • Empty separators string
  • Float expected for the specified format
  • Format too long
  • Idx out of range
  • Inconsistent compare function
  • Indexing [variable name] with [variable name]
  • Index out of range
  • Integer expected for the specified format
  • Internal error (_nexti) wrong argument type
  • Invalid base type
  • Invalid environment
  • Invalid format
  • Invalid free var index
  • Invalid index type for an array
  • Invalid object type
  • Invalid or corrupted closure stream
  • Invalid origin
  • Invalid param / Invalid parameter
  • Invalid param type
  • Invalid typemask
  • Invalid type tag
  • Invalid type / Inalid type, expected table
  • Modulo by zero
  • Modulo overflow
  • Native closure expected
  • Native stack overflow
  • Negative size
  • New member only works with classes
  • _nexti failed
  • _nexti returned an invalid idx
  • No closure in the calls stack
  • No data left to read
  • Not enough parameters for the given format string
  • Not enough params in the stack
  • Null cannot be used as index
  • Null is not a valid key / Null key
  • Numeric value expected as return value of the compare function
  • Object must be a class
  • Only generators can be resumed
  • Out of memory
  • Parameter [name] has an invalid type [variable type]
  • Precision format too long
  • rawget works only on array/table/instance and class
  • rawset works only on array/table/class and instance
  • remove() failed
  • rename() failed
  • resize failed
  • Resuming active generator
  • Resuming dead generator
  • Size must be a number
  • Slice out of range
  • Stack overflow
  • Stack overflow, cannot resize stack while in a metamethod
  • String expected for the specified format
  • Table expected
  • The blob is invalid
  • The class is locked
  • The index doesn’t exist / The index [name] does not exist
  • The object is not a class
  • The object is not a class instance
  • The object is not a closure / The object is not a native closure
  • The object must be a weakref
  • The property [name] already exists
  • The target is not a closure
  • The type doesn’t have a default delegate
  • This object cannot be cloned
  • top() on a empty array
  • Trying to inherit from a [variable type]
  • Trying to modify a class that has already been instantiated
  • Trying to resume a [entity], only genenerator can be resumed
  • Trying to yield a [entity], only generator can be yielded
  • Unknown error
  • Unrecognized encoding
  • Width format too long
  • Wrong argument type
  • Wrong index / Wrong indexes
  • Wrong number of parameters
  • Wrong param / Wrong parameter
  • Wrong type / Wrong type (expected class or instance)