[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sfa error checking
- To: GZ at MIT-MC
- Subject: sfa error checking
- From: Robert W. Kerns <RWK at MIT-MC>
- Date: Sat, 20 Dec 80 18:32:00 GMT
- Cc: BUG-LISP at MIT-MC
- Original-date: 20 December 1980 13:32-EST
Date: 20 December 1980 08:48-EST
From: Gail Zacharias <GZ at MIT-MC>
Subject: sfa error checking
To: BUG-LISP at MIT-MC
Consider the following session:
(defun nothin N '())
(setq test (sfa-create (function nothin) 17. 'testing))
(filepos test 13.)
(sfa-call test (function untyi) ())
(tyo 3 test)
(out test 2)
(prin1 1 test)
(princ 'a test)
(print 'foo test)
(in test) ;; Well, at least this one errs out
;NIL NON-FIXNUM VALUE
Do I have to define all these operations just to have them err out?
TYI is the only one that actually complains that it is not supported.
Since there is in fact an infinite variety of messages which you can send,
you're expected to do your own error checking. You don't have to define
ANYTHING to give an error message! Normally handlers for SFA's are CASEQ's
over the message names, and the T clause is normally a call to CERROR.
This isn't to say that LISP couldn't be doing it's own checking in *RSET T mode
for LISP's internal operations, but there is nothing wrong with writing an
explict (SFA-CALL SFA 'TYO 5), and you should be giving an error message for
this, since you're not returning to in response to WHICH-OPERATIONS.
BTW, the reason (IN TEST) errored out is just that NIL isn't a valid thing to
return from an IN operation.