6.5 Errors

When an error occurs during the execution of a miscop, a call to %SP-Internal-Error is performed. This call is a break-type call, so if the error is proceeded (with a Break-Return instruction), no value will be returned.

%SP-Internal-Error is passed a fixnum error code as its first argument. The second argument is a fixnum offset into the current code vector that points to the location immediately following the instruction that encountered the trouble. From this offset, the Lisp-level error handler can reconstruct the PC of the losing instruction, which is not readily available in the micro-machine. Following the offset, there may be 0 - 2 additional arguments that provide information of possible use to the error handler. For example, an unbound-symbol error will pass the symbol in question as the third arg.

The following error codes are currently defined. Unless otherwise specified, only the error code and the code-vector offset are passed as arguments.

1 Object Not List

The object is passed as the third argument.

2 Object Not Symbol

The object is passed as the third argument.

3 Object Not Number

The object is passed as the third argument.

4 Object Not Integer

The object is passed as the third argument.

5 Object Not Ratio

The object is passed as the third argument.

6 Object Not Complex

The object is passed as the third argument.

7 Object Not Vector

The object is passed as the third argument.

8 Object Not Simple Vector

The object is passed as the third argument.

9 Illegal Function Object

The object is passed as the third argument.

10 Object Not Header

The object (which is not an array or function header) is passed as the third argument.

11 Object Not I-Vector

The object is passed as the third argument.

12 Object Not Simple Bit Vector

The object is passed as the third argument.

13 Object Not Simple String

The object is passed as the third argument.

14 Object Not Character

The object is passed as the third argument.

15 Object Not Control Stack Pointer

The object is passed as the third argument.

16 Object Not Binding Stack Pointer

The object is passed as the third argument.

17 Object Not Array

The object is passed as the third argument.

18 Object Not Non-negative Fixnum

The object is passed as the third argument.

19 Object Not System Area Pointer

The object is passed as the third argument.

20 Object Not System Pointer

The object is passed as the third argument.

21 Object Not Float

The object is passed as the third argument.

22 Object Not Rational

The object is passed as the third argument.

23 Object Not Non-Complex Number

A complex number has been passed to the comparison routine for < or >. The complex number is passed as the third argument.

25 Unbound Symbol

Attempted access to the special value of an unbound symbol. Passes the symbol as the third argument to %Sp-Internal-Error.

26 Undefined Symbol

Attempted access to the definition cell of an undefined symbol. Passes the symbol as the third argument to %Sp-Internal-Error.

27 Altering NIL

Attempt to bind or setq the special value of NIL.

28 Altering T

Attempt to bind or setq the special value of T.

30 Illegal Vector Access Type

The specified access type is returned as the third argument.

31 Illegal Vector Size

Attempt to allocate a vector with negative size or size too large for vectors of this type. Passes the requested size as the third argument.

32 Vector Index Out of Range

The specified index is out of bounds for this vector. The bad index is passed as the third argument.

33 Illegal Vector Index

The specified index is not a positive fixnum. The bad index is passed as the third argument.

34 Illegal Shrink Vector Value

The specified value to shrink a vector to is not a positive fixnum. The bad value is passed as the third argument.

35 Not A Shrink

The specified value is greater than the current size of the vector being shrunk. The bad value is passed as the third argument.

36 Illegal Data Vector

The data vector of an array is illegal. The bad vector is passed as the third value.

37 Array has Too Few Indices

An attempt has been made to access an array as a two or three dimensional array when it has fewer than two or three dimensions, respectively.

38 Array has Too Many Indices

An attempt has been made to access an array as a two or three dimensional array when it has more than two or three dimensions, respectively.

40 Illegal Byte Specifier

A bad byte specifier has been passed to one of the byte manipulation miscops. The offending byte specifier is passed as the third argument.

41 Illegal Position in Byte Specifier

A bad position has been given in a byte specifier that has been passed to one of the byte manipulation miscops. The offending byte specifier is passed as the third argument.

42 Illegal Size in Byte Specifier

A bad size has been given in a byte specifier that has been passed to one of the byte manipulation miscops. The offending byte specifier is passed as the third argument.

43 Illegal Shift Count

A shift miscop has encountered non fixnum shift count. The offending shift count is passed as the third argument.

44 Illegal Boole Operation

The operation code passed to the boole miscop is either not a fixnum or is out of range. The operation code is passed as the third argument.

50 Too Few Arguments

Too few arguments have been passed to a function. The number of arguments actually passed is passed as the third argument, and the function is passed as the fourth.

51 Too Many Arguments

Too many arguments have been passed to a function. The number of arguments actually passed is passed as the third argument, and the function is passed as the fourth.

52 Last Apply Arg Not a List

The last argument to a function being invoked by apply is not a list. The last argument is passed as the third argument.

53 Deleted Link Table Entry

An attempt has been made to call a function through a link table entry which no longer exists. This is a serious internal error and should never happen.

55 Error Not <=

The check-<= miscop will invoke this error if the condition is false. The two arguments are passed as the third and fourth arguments to %SP-internal-error.

60 Divide by 0

An division operation has done a division by zero. The two operands are passed as the third and fourth arguments.

61 Unseen Throw Tag

An attempt has been made to throw to a tag that is not in the current catch hierarchy. The offending tag is passed as the third argument.

62 Short Float Underflow

A short float operation has resulted in underflow. The two arguments to the operation are passed as the third and fourth arguments.

63 Short Float Overflow

A short float operation has resulted in overflow. The two arguments to the operation are passed as the third and fourth arguments.

64 Single Float Underflow

A single float operation has resulted in underflow. The two arguments to the operation are passed as the third and fourth arguments.

65 Single Float Overflow

A single float operation has resulted in overflow. The two arguments to the operation are passed as the third and fourth arguments.

66 Long Float Underflow

A long float operation has resulted in underflow. The two arguments to the operation are passed as the third and fourth arguments.

67 Long Float Overflow

A long float operation has resulted in overflow. The two arguments to the operation are passed as the third and fourth arguments.

68 Monadic Short Float Underflow

A short float operation has resulted in underflow. The argument to the operation is passed as the third argument.

69 Monadic Short Float Overflow

A short float operation has resulted in overflow. The argument to the operation is passed as the third argument.

70 Monadic Long Float Underflow

A long float operation has resulted in underflow. The argument to the operation is passed as the third argument.

71 Monadic Long Float Overflow

A long float operation has resulted in overflow. The argument to the operation is passed as the third argument.