Number: 973

Date:  4-May-84 10':13':30

Submitter: Sannella.PA


Subject: Error machinery thinks ERRORSET is REALFRAMEP, and tries to restart it

Assigned To: 

Attn: Masinter

Status: Open


Problem Type: Bug

Impact: Moderate

Difficulty: Hard

Frequency: Everytime

Priority: Perhaps

System: Language Support

Subsystem: Stack and Interpreter



Lisp Version: 

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 


Description: '
Date': 25 Apr 84 14':50 PST'
Subject': Lisp': \BIN of closed stream doesn''t obey ERRORTYPELST corrections'
To':, Kaplan, VanMelle, Masinter'
Lisp System Date': 16-Apr-84 12':58':26'
Machine': Dandelion (Sybalsky)'
Microcode version': 24,4'
Memory size': 16000'
Frequency': Always'
Impact': SERIOUS'
The BIN function for a closed stream is \STREAM.NOT.OPEN.  If you try to \BIN from a closed stream, that function gets called, and in turn calls LISPERROR correctly.'
However--if there is an ERRORTYPELST entry for the file-not-open error that reopens the file, the BIN will never succeed!  \STREAM.NOT.OPEN has no provision for recovery in it.'
In particular, this fouls up TEdit, which closes its text streams to avoid leaving open files all over the place--but Lafite''s delivery process then needs to use that stream, and the result is no mail getting sent.'
Date': 25 Apr 84 17':09 PST'
Subject': Re': Lisp': \BIN of closed stream doesn''t obey ERRORTYPELST corrections'
In-reply-to':''s message of 25 Apr 84 14':50 PST'
This is a general shortcoming of ERRORTYPELST.'
"ERRORTYPELST is searched for an element with the same error number as that causing the error.  If one is found, the corresponding forms are evaluated, and if the last one produces a non-NIL value, this value is substituted for the offender, and the function causing the error is reentered."'
Thus, in order for this to work, it needs to be the case that the guy who generates the error passes one of its arguments as the argument to LISPERROR, and that changing the argument and restarting the function (which, by the way, must be a non-backslash fn) gives some hope for success.  It works fairly nicely for FILE NOT FOUND in most cases (except see ar on FONTCREATE).  It doesn''t work so well for other things.  The problem you encountered with Lafite was an example where the thing it tried to restart was an ERRORSET, which can''t possibly work [need AR': Error machinery thinks ERRORSET is REALFRAMEP, and thus erroneously tries to restart it in certain cases, leading to totally confusing error udf (DUMMY.FOR.ERRORSET)].'
It seems clear to me that Tedit should not CLOSEF a textstream unless it really means it.  And we should be raising the priority on multiple open streams (and probably stream finalization) so that we can get rid of these headaches associated with Tedit''s not knowing whether it''s ok to close a file.'


Test Case: 

Edit-By: vanMelle

Edit-Date: 22-May-84 15':17':08