X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fbignum.lisp;h=719f369e4b91386a6f9da1e885625fea3e105ac9;hb=b63c81837c2eae7bcf3b09911f68ba62d102b63d;hp=9fd50857505fb47688b2138be6b0c7f3a8528054;hpb=08307967c71c580058a503d46aa087cfefcf8c69;p=sbcl.git diff --git a/src/code/bignum.lisp b/src/code/bignum.lisp index 9fd5085..719f369 100644 --- a/src/code/bignum.lisp +++ b/src/code/bignum.lisp @@ -812,7 +812,7 @@ (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) @@ -980,8 +980,16 @@ (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