Welcome to the CHICKEN Scheme pasting service

error handling still puzzles me added by wasamasa on Thu Oct 4 23:00:18 2018

(define (define-error location message . condition)
  (let ((base (make-property-condition 'exn 'location location 'message message))
        (extra (apply make-property-condition condition)))
    (make-composite-condition base extra)))

(define (sxml-error data location)
  (define-error location "invalid sxml" 'sxml 'data data))

(for-each
 (lambda (x)
   (condition-case
    (if (even? x)
        (sxml-error "foo" 'foo)
        (print x))
    ((exn sxml) (print 42))))
 '(1 2 3))

;; the above prints 1 and 3, not 1, 42 and 3, why?

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which backend storage does qwiki use?
Visually impaired? Let me spell it for you (wav file) download WAV