Ticket #977: ssax-parser-error.diff

File ssax-parser-error.diff, 675 bytes (added by Christian Kellermann, 11 years ago)

better conditions for parser-error

  • 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 port msg . specialising-msg*)
     37  (signal (make-composite-condition
     38           (make-property-condition 'ssax)
     39           (make-property-condition 'parser-error)
     40           (make-property-condition 'exn 'message msg 'arguments specialising-msg*))))
    3741
    3842(define (ssax:warn port msg . other-msg)
    3943  (apply cerr (cons* nl "Warning: " msg other-msg)))