From: Taylor R Campbell Date: Wed, 9 Dec 2009 17:43:44 +0000 (-0500) Subject: Fix ERROR:ILLEGAL-STREAM-ELEMENT in runtime/stream.scm. X-Git-Tag: 20100708-Gtk~220 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6d1253b90924fbfece9673b74ea17216fd64c6f6;p=mit-scheme.git Fix ERROR:ILLEGAL-STREAM-ELEMENT in runtime/stream.scm. The first argument to what CONDITION-CONSTRUCTOR returns must be a continuation, so (ERROR (MAKE-ILLEGAL-STREAM-ELEMENT ...)) doesn't work. Instead use CONDITION-SIGNALLER. --- diff --git a/src/runtime/stream.scm b/src/runtime/stream.scm index a99023fba..066e59cf0 100644 --- a/src/runtime/stream.scm +++ b/src/runtime/stream.scm @@ -296,11 +296,8 @@ USA. (reset-primes!) (add-secondary-gc-daemon! reset-primes!))) -(define (error:illegal-stream-element stream operator operand) - (error (make-illegal-stream-element "stream" stream operator operand))) - -(define make-illegal-stream-element) (define condition-type:illegal-stream-element) +(define error:illegal-stream-element) (define (initialize-conditions!) (set! condition-type:illegal-stream-element @@ -310,14 +307,18 @@ USA. (lambda (condition port) (write-string "The object " port) (write (access-condition condition 'DATUM) port) - (write-string ", occurring in the " port) + (write-string ", passed as the " port) (write-string (ordinal-number-string (+ (access-condition condition 'OPERAND) 1)) port) (write-string " argument to " port) (write-operator (access-condition condition 'OPERATOR) port) (write-string ", is not a stream." port)))) - (set! make-illegal-stream-element - (condition-constructor condition-type:illegal-stream-element - '(TYPE DATUM OPERATOR OPERAND))) + (set! error:illegal-stream-element + (let ((signaller + (condition-signaller condition-type:illegal-stream-element + '(TYPE DATUM OPERATOR OPERAND) + standard-error-handler))) + (named-lambda (error:illegal-stream-element stream operator operand) + (signaller "stream" stream operator operand)))) unspecific) \ No newline at end of file