[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
error handling
Date: Thu, 12 Apr 84 13:06:04 EST
From: Stanley Letovsky <Letovsky@YALE.ARPA>
Subject: error handling
To: T-Discussion@YALE.ARPA
I have this problem of needing to take some action when an error occurs,
regardless of why. I am in a situation where I have acquired the display,
and then I am running user-supplied code. If an error occurrs, I have
to release the display immmediately -- before even writing an error
message -- or the system will get highly screwed up. Is there any
way - released or unreleased - to get control immediately upon an error?
-------
I too have the problem of wanting to handle errors. While I have delayed
writing code to handle this problem, the avenue that I intend to take
is as follows.
1) import the error procedure from the implementation env.
2) assign a tmp procedure to the error procedure, so that
it may be restored later
3) create a new procedure with the same arguement form as error
( i.e. unknown number of args). The procedure
should first release the display, do any any processing,
call the tmp procedure (assigned in 2) to handle the error,
and then do any post error handling (like restore the display)
4 ) set the value of the error procedure ( in the t implementation
env ) to the procedure created in 3 )
please tell me how this turns out
Bruce Rosen