From 31ff38b8a0ff345d9798d97ad215846699d79203 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Wed, 31 Jul 1996 18:31:20 +0000 Subject: [PATCH] Fix thinko: only conditions are errors! --- v7/src/swat/scheme/tk-mit.scm | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/v7/src/swat/scheme/tk-mit.scm b/v7/src/swat/scheme/tk-mit.scm index c70ddcf88..648fcf88c 100644 --- a/v7/src/swat/scheme/tk-mit.scm +++ b/v7/src/swat/scheme/tk-mit.scm @@ -1,7 +1,7 @@ ; -*- Scheme -*- ;;;;; C external interfaces to Tk procedures not associated with ;;;;; a particular widget. -;;;; $Id: tk-mit.scm,v 1.2 1996/07/31 18:12:58 adams Exp $ +;;;; $Id: tk-mit.scm,v 1.3 1996/07/31 18:31:20 adams Exp $ ;;;; This is the lowest level Scheme interface to general TK/TCL data ;;;; structures. Primitives are defined in tk-mit.c and tk.c @@ -349,19 +349,20 @@ (define (apply-callback callback arglist) (cond ((ignore-errors (lambda () (apply callback arglist))) - => (lambda (condition) - (let ((port (notification-output-port))) - (newline port) - (write-string "; Error in callback " port) - (display callback port) - (newline port) - (write-string ";" port) - (write-condition-report condition port) - (newline port) - (write-string ";To debug, type (debug (unhash " port) - (write (hash condition) port) - (write-string "))" port) - (newline port)))))) + => (lambda (result) + (if (condition? result) + (let ((port (notification-output-port))) + (newline port) + (write-string ";Error in callback " port) + (display callback port) + (newline port) + (write-string ";" port) + (write-condition-report result port) + (newline port) + (write-string ";To debug, type (debug #@" port) + (write (hash result) port) + (write-string ")" port) + (newline port))))))) (define *event-processing-mutex* (make-thread-mutex)) -- 2.25.1