Ticket #977: parse-error.diff

File parse-error.diff, 581 bytes (added by Christian Kellermann, 8 years ago)

raise a condition instead of calling error directly

  • ssax-chicken.scm

     
    3333  (core:assert (= k 1) "attempt to call ssax:make-string with k != 1")
    3434  (string x))
    3535
    36 (define parser-error error)
     36(define (parser-error . args)
     37  (signal (make-composite-condition
     38           (make-property-condition 'ssax)
     39           (make-property-condition 'parse-error 'message args))))
    3740
    3841(define (ssax:warn port msg . other-msg)
    3942  (apply cerr (cons* nl "Warning: " msg other-msg)))