[742] in Coldmud discussion meeting

root meeting help first previous next next in chain last in chain last

idea for custom error handling

daemon@ATHENA.MIT.EDU (Wed May 24 16:49:49 1995 )

From: Robert de Forest (Crag@JHM) <crag@serial.io.com>
To: coldstuff@MIT.EDU
Date: Wed, 24 May 1995 14:14:41 -0500 (CDT)

I had this idea a while ago but I don't remember posting it.

I'd like to add 'global catching' of a sort where the first action taken by
 the server when an error is thrown is to suspend the task and call
 $sys.handle_error(error, error_str, error_arg, task_id). If the task is
 resumed the expression that threw the error would instead return the value
 the task was resumed with. A new function 'complete_throw' (help me think
 of a better name) would be added to cause the usual action to happen.

The point of all this is to allow a function to be debugged as it's running.
 .handle_error could choose to leave the task suspended and tell the
 programmer about the suspended task, etc.

On a separate topic, I'd like to see traceback and callers include arg info.
 callers is already an encapsulation breaking function only useful for
 debugging and such and the same goes for traceback :). This would allow me
 to inspect the args going into a method which caused it to throw.

I might make these changes myself, or I might not. I'd like to know what other
 people think.

Crag / Robert