X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fcompiler-error.lisp;h=0c5e75148672a7a2181a5e02ba31c4b182856a67;hb=68fd2d2dd6f265669a8957accd8a33e62786a97e;hp=39bf68f058da3efc2d0063d97c32ec451e2c78b5;hpb=d40a76606c86722b0aef8179155f9f2840739b72;p=sbcl.git diff --git a/src/compiler/compiler-error.lisp b/src/compiler/compiler-error.lisp index 39bf68f..0c5e751 100644 --- a/src/compiler/compiler-error.lisp +++ b/src/compiler/compiler-error.lisp @@ -25,9 +25,14 @@ (defvar *compiler-error-bailout* (lambda () (error "COMPILER-ERROR with no bailout"))) -;;; We have a separate COMPILER-ERROR condition to allow us to -;;; distinguish internal compiler errors from user errors. -;;; Non-compiler errors put us in the debugger. +;;; an application programmer's error caught by the compiler +;;; +;;; We want a separate condition for application programmer errors so +;;; that we can distinguish them from system programming errors (bugs +;;; in SBCL itself). Application programmer errors should be caught +;;; and turned into diagnostic output and a FAILURE-P return value +;;; from COMPILE or COMPILE-FILE. Bugs in SBCL itself throw us into +;;; the debugger. (define-condition compiler-error (simple-error) ()) ;;; Signal the appropriate condition. COMPILER-ERROR calls the bailout @@ -47,9 +52,7 @@ :format-control format-string :format-arguments format-args) (funcall *compiler-error-bailout*) - ;; FIXME: It might be nice to define a BUG or OOPS function for "shouldn't - ;; happen" cases like this. - (error "internal error, control returned from *COMPILER-ERROR-BAILOUT*")) + (bug "Control returned from *COMPILER-ERROR-BAILOUT*.")) (defun compiler-warn (format-string &rest format-args) (apply #'warn format-string format-args) (values))