X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcold-error.lisp;h=193667513b86ae9caa17ffb479e8fc8491246d5f;hb=0af84c9c90b1277be6863df8f28f1f0e5512323c;hp=6e89c6b6322695398a48987142269b49ec59e641;hpb=72408d179d7396904e25e9a3dc423d2634e65072;p=sbcl.git diff --git a/src/code/cold-error.lisp b/src/code/cold-error.lisp index 6e89c6b..1936675 100644 --- a/src/code/cold-error.lisp +++ b/src/code/cold-error.lisp @@ -111,17 +111,26 @@ (invoke-debugger condition))))) nil) -(defun break (&optional (datum "break") &rest arguments) - #!+sb-doc - "Print a message and invoke the debugger without allowing any possibility - of condition handling occurring." +;;; like BREAK, but without rebinding *DEBUGGER-HOOK* to NIL, so that +;;; we can use it in system code (e.g. in SIGINT handling) without +;;; messing up --noprogrammer mode (which works by setting +;;; *DEBUGGER-HOOK*) +(defun %break (what &optional (datum "break") &rest arguments) + ;; FIXME: Do we really want INFINITE-ERROR-PROTECT in BREAKish stuff? (sb!kernel:infinite-error-protect - (with-simple-restart (continue "Return from BREAK.") + (with-simple-restart (continue "Return from ~S." what) (let ((sb!debug:*stack-top-hint* (maybe-find-stack-top-hint))) (invoke-debugger - (coerce-to-condition datum arguments 'simple-condition 'break))))) + (coerce-to-condition datum arguments 'simple-condition what))))) nil) +(defun break (&optional (datum "break") &rest arguments) + #!+sb-doc + "Print a message and invoke the debugger without allowing any possibility + of condition handling occurring." + (let ((*debugger-hook* nil)) ; as specifically required by ANSI + (apply #'%break 'break datum arguments))) + (defun warn (datum &rest arguments) #!+sb-doc "Warn about a situation by signalling a condition formed by DATUM and