X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcondition.lisp;h=c17e2c3e5d91a6f7e6a845f562b01bca3577baf9;hb=abfd7c2c9d4882e05a2e9953baf87f8e02a6a1af;hp=c59ccb44b5d2bcc743e980430f80a87c76131b72;hpb=b66385e2031fc2cac17dd129df0af400beb48a22;p=sbcl.git diff --git a/src/code/condition.lisp b/src/code/condition.lisp index c59ccb4..c17e2c3 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -755,13 +755,14 @@ (or (position #\Newline string :from-end t) -1) 1)))) (file-position-or-nil-for-error error-stream pos)) - (format stream - "READER-ERROR ~@[at ~W ~]~ - ~@[(line ~W~]~@[, column ~W) ~]~ - on ~S:~%~?" - pos lineno colno error-stream - (reader-error-format-control condition) - (reader-error-format-arguments condition))))))) + (pprint-logical-block (stream nil) + (format stream + "READER-ERROR ~@[at ~W ~]~ + ~@[(line ~W~]~@[, column ~W) ~]~ + on ~S:~2I~_~?" + pos lineno colno error-stream + (reader-error-format-control condition) + (reader-error-format-arguments condition)))))))) ;;;; special SBCL extension conditions @@ -811,7 +812,7 @@ ;;; unimplemented and (2) unintentionally just screwed up somehow. ;;; (Before this condition was defined, test code tried to deal with ;;; this by checking for FBOUNDP, but that didn't work reliably. In -;;; sbcl-0.7.0, a a package screwup left the definition of +;;; sbcl-0.7.0, a package screwup left the definition of ;;; LOAD-FOREIGN in the wrong package, so it was unFBOUNDP even on ;;; architectures where it was supposed to be supported, and the ;;; regression tests cheerfully passed because they assumed that @@ -1109,16 +1110,6 @@ SB-EXT:PACKAGE-LOCKED-ERROR-SYMBOL.")) '(:ansi-cl :section (15 1 2 1)) '(:ansi-cl :section (15 1 2 2))))) -(define-condition io-timeout (stream-error) - ((direction :reader io-timeout-direction :initarg :direction)) - (:report - (lambda (condition stream) - (declare (type stream stream)) - (format stream - "I/O timeout ~(~A~)ing ~S" - (io-timeout-direction condition) - (stream-error-stream condition))))) - (define-condition namestring-parse-error (parse-error) ((complaint :reader namestring-parse-error-complaint :initarg :complaint) (args :reader namestring-parse-error-args :initarg :args :initform nil) @@ -1157,7 +1148,26 @@ SB-EXT:PACKAGE-LOCKED-ERROR-SYMBOL.")) (reader-error-format-arguments condition) (reader-impossible-number-error-error condition)))))) -(define-condition timeout (serious-condition) ()) +(define-condition timeout (serious-condition) + ((seconds :initarg :seconds :initform nil :reader timeout-seconds)) + (:report (lambda (condition stream) + (format stream "Timeout occurred~@[ after ~A seconds~]." + (timeout-seconds condition))))) + +(define-condition io-timeout (stream-error timeout) + ((direction :reader io-timeout-direction :initarg :direction)) + (:report + (lambda (condition stream) + (declare (type stream stream)) + (format stream + "I/O timeout ~(~A~)ing ~S." + (io-timeout-direction condition) + (stream-error-stream condition))))) + +(define-condition deadline-timeout (timeout) () + (:report (lambda (condition stream) + (format stream "A deadline was reached after ~A seconds." + (timeout-seconds condition))))) (define-condition declaration-type-conflict-error (reference-condition simple-error) @@ -1226,6 +1236,15 @@ single-stepping information after executing a form. STEP-CONDITION-FORM holds the form, and STEP-CONDITION-RESULT holds the values returned by the form as a list. No associated restarts.")) +(define-condition step-finished-condition (step-condition) + () + (:report + (lambda (condition stream) + (declare (ignore condition)) + (format stream "Returning from STEP"))) + #!+sb-doc + (:documentation "Condition signaled when STEP returns.")) + ;;;; restart definitions