Changeset 10356


Ignore:
Timestamp:
Aug 5, 2008, 11:35:48 AM (11 years ago)
Author:
gb
Message:

From working-0711 branch: Stop supporting old (CLtL2) DEFINE-CONDITION
syntax. Stop using it, too. (List of slots is required in ANSI CL,
even if it's empty.)

Location:
trunk/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-error-system.lisp

    r10137 r10356  
    6060                       (print-not-readable-stream c))))))
    6161
    62 (define-condition simple-warning (simple-condition warning))
     62(define-condition simple-warning (simple-condition warning) ())
    6363
    6464(define-condition compiler-warning (warning)
     
    7171  (:report report-compiler-warning))
    7272
    73 (define-condition style-warning (compiler-warning))
    74 (define-condition undefined-function-reference (style-warning))
    75 (define-condition macro-used-before-definition (compiler-warning))
    76 (define-condition invalid-arguments (style-warning))
    77 (define-condition invalid-arguments-global (style-warning))
    78 
    79 (define-condition simple-error (simple-condition error))
    80 
    81 (define-condition simple-storage-condition (simple-condition storage-condition))
    82 (define-condition stack-overflow-condition (simple-storage-condition))
     73(define-condition style-warning (compiler-warning) ())
     74(define-condition undefined-function-reference (style-warning) ())
     75(define-condition macro-used-before-definition (compiler-warning) ())
     76(define-condition invalid-arguments (style-warning) ())
     77(define-condition invalid-arguments-global (style-warning) ())
     78
     79(define-condition simple-error (simple-condition error) ())
     80
     81(define-condition simple-storage-condition (simple-condition storage-condition)())
     82(define-condition stack-overflow-condition (simple-storage-condition) ())
    8383
    8484(define-condition invalid-memory-access (storage-condition)
     
    176176                     (type-error-expected-type c)))))
    177177
    178 (define-condition simple-type-error (simple-condition type-error))
    179 
    180 
    181 
    182 (define-condition program-error (error))
     178(define-condition simple-type-error (simple-condition type-error) ())
     179
     180
     181
     182(define-condition program-error (error) ())
    183183(define-condition simple-program-error (simple-condition program-error)
    184184  ((context :initarg :context :reader simple-program-error-context :initform nil)))
     
    191191                             :format-arguments args))))
    192192
    193 (define-condition simple-destructuring-error (simple-program-error))
     193(define-condition simple-destructuring-error (simple-program-error) ())
    194194
    195195(define-condition wrong-number-of-arguments (program-error)
     
    199199  (:report report-argument-mismatch))
    200200       
    201 (define-condition too-many-arguments (wrong-number-of-arguments))
    202 
    203 (define-condition too-few-arguments (wrong-number-of-arguments))
     201(define-condition too-many-arguments (wrong-number-of-arguments) ())
     202
     203(define-condition too-few-arguments (wrong-number-of-arguments) ())
    204204
    205205(defun report-argument-mismatch (c s)
     
    242242             (format nil "~a" c)))))
    243243
    244 (define-condition control-error (error))
     244(define-condition control-error (error) ())
    245245
    246246(define-condition cant-throw-error (control-error)
     
    479479                         operands))))))
    480480
    481 (define-condition division-by-zero (arithmetic-error))
     481(define-condition division-by-zero (arithmetic-error) ())
    482482 
    483 (define-condition floating-point-underflow (arithmetic-error))
    484 (define-condition floating-point-overflow (arithmetic-error))
    485 (define-condition floating-point-inexact (arithmetic-error))
    486 (define-condition floating-point-invalid-operation (arithmetic-error))
     483(define-condition floating-point-underflow (arithmetic-error) ())
     484(define-condition floating-point-overflow (arithmetic-error) ())
     485(define-condition floating-point-inexact (arithmetic-error) ())
     486(define-condition floating-point-invalid-operation (arithmetic-error) ())
    487487
    488488(define-condition compiler-bug (simple-error)
  • trunk/source/lib/macros.lisp

    r10354 r10356  
    20662066;;; which tests *print-escape* ?  Scary if so ...
    20672067
    2068 (defmacro define-condition (name (&rest supers) &optional ((&rest slots)) &body options)
     2068(defmacro define-condition (name (&rest supers) (&rest slots) &body options)
    20692069  "DEFINE-CONDITION Name (Parent-Type*) (Slot-Spec*) Option*
    20702070   Define NAME as a condition type. This new type inherits slots and its
     
    21272127       (defclass ,name ,(or supers '(condition)) ,slots ,@classopts)
    21282128       ,@reporter
     2129       ;; defclass will record name as a class, we only want
     2130      #+new-record-source
     2131       (remove-definition-source 'class ',name)
     2132       (record-source-file ',name 'condition)
    21292133       ',name)))
    21302134
Note: See TracChangeset for help on using the changeset viewer.