Changeset 15302
- Timestamp:
- Apr 7, 2012, 4:19:14 PM (13 years ago)
- Location:
- trunk/source
- Files:
-
- 2 edited
-
level-1/l1-error-system.lisp (modified) (2 diffs)
-
lib/macros.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-error-system.lisp
r15237 r15302 1352 1352 1353 1353 (flet ((io-stream-p (x) (and (streamp x) (eq (stream-direction x) :io))) 1354 (i nput-stream-p (x) (and (streamp x) (input-stream-p x)))1355 ( output-stream-p (x) (and (streamp x) (output-stream-p x)))1354 (is-input-stream-p (x) (and (streamp x) (input-stream-p x))) 1355 (is-output-stream-p (x) (and (streamp x) (output-stream-p x))) 1356 1356 (default-terminal-io () (make-echoing-two-way-stream *stdin* *stdout*)) 1357 1357 (terminal-io () *terminal-io*) … … 1363 1363 (check-error-global '*query-io* #'io-stream-p #'terminal-io) 1364 1364 (check-error-global '*debug-io* #'io-stream-p #'terminal-io) 1365 (check-error-global '*standard-input* #'i nput-stream-p #'terminal-io)1366 (check-error-global '*standard-output* #' output-stream-p #'terminal-io)1367 (check-error-global '*error-output* #' output-stream-p #'standard-output)1368 (check-error-global '*trace-output* #' output-stream-p #'standard-output))1369 1365 (check-error-global '*standard-input* #'is-input-stream-p #'terminal-io) 1366 (check-error-global '*standard-output* #'is-output-stream-p #'terminal-io) 1367 (check-error-global '*error-output* #'is-output-stream-p #'standard-output) 1368 (check-error-global '*trace-output* #'is-output-stream-p #'standard-output)) 1369 -
trunk/source/lib/macros.lisp
r15236 r15302 444 444 (handler-case (return-from ,normal-return ,form) 445 445 ,@(remove no-error-clause clauses))))))) 446 (flet ((handler-case (type var &rest body)446 (flet ((handler-case-aux (type var &rest body) 447 447 (when (eq type :no-error) 448 448 (signal-program-error "Duplicate :no-error clause. ")) … … 453 453 (cluster (gensym))) 454 454 (multiple-value-bind (type var body) 455 (apply #'handler-case (car clauses))455 (apply #'handler-case-aux (car clauses)) 456 456 (if var 457 457 `(block ,block … … 476 476 (setq index (1+ index)) 477 477 (multiple-value-bind (type var body) 478 (apply #'handler-case (pop clauses))478 (apply #'handler-case-aux (pop clauses)) 479 479 (push `',type handlers) 480 480 (push index handlers) … … 2225 2225 2226 2226 (defmacro define-condition (name (&rest supers) (&rest slots) &body options) 2227 "DEFINE-CONDITION Name (Parent-Type*) (Slot-Spec*) Option* 2228 Define NAME as a condition type. This new type inherits slots and its 2229 report function from the specified PARENT-TYPEs. A slot spec is a list of: 2230 (slot-name :reader <rname> :initarg <iname> {Option Value}* 2231 2232 The DEFINE-CLASS slot options :ALLOCATION, :INITFORM, [slot] :DOCUMENTATION 2233 and :TYPE and the overall options :DEFAULT-INITARGS and 2234 [type] :DOCUMENTATION are also allowed. 2235 2236 The :REPORT option is peculiar to DEFINE-CONDITION. Its argument is either 2237 a string or a two-argument lambda or function name. If a function, the 2238 function is called with the condition and stream to report the condition. 2239 If a string, the string is printed. 2240 2241 Condition types are classes, but (as allowed by ANSI and not as described in 2242 CLtL2) are neither STANDARD-OBJECTs nor STRUCTURE-OBJECTs. WITH-SLOTS and 2243 SLOT-VALUE may not be used on condition objects." 2244 ; If we could tell what environment we're being expanded in, we'd 2245 ; probably want to check to ensure that all supers name conditions 2246 ; in that environment. 2227 ;; If we could tell what environment we're being expanded in, we'd 2228 ;; probably want to check to ensure that all supers name conditions 2229 ;; in that environment. 2247 2230 (let ((classopts nil) 2248 2231 (duplicate nil)
Note:
See TracChangeset
for help on using the changeset viewer.
