0.7.9.53:
[sbcl.git] / src / code / bignum.lisp
index 9fd5085..719f369 100644 (file)
          (bignum-ashift-left-unaligned bignum digits n-bits res-len))))
     ;; Left shift by a number too big to be represented as a fixnum
     ;; would exceed our memory capacity, since a fixnum is big enough
-    ;; index any array, including a bit array.
+    ;; to index any array, including a bit array.
     (error "can't represent result of left shift")))
 
 (defun bignum-ashift-left-digits (bignum bignum-len digits)
               (declare (type bignum-index len))
               (let ((exp (+ exp bias)))
                 (when (> exp max)
-                  (error "Too large to be represented as a ~S:~%  ~S"
-                         format x))
+                  ;; Why a SIMPLE-TYPE-ERROR? Well, this is mainly
+                  ;; called by COERCE, which requires an error of
+                  ;; TYPE-ERROR if the conversion can't happen
+                  ;; (except in certain circumstances when we are
+                  ;; coercing to a FUNCTION) -- CSR, 2002-09-18
+                  (error 'simple-type-error
+                         :format-control "Too large to be represented as a ~S:~%  ~S"
+                         :format-arguments (list format x)
+                         :expected-type format
+                         :datum x))
                 exp)))
 
     (cond