Re: Try..Except..Else

Jaap Vermeulen (jaap@sequent.com)
Wed, 15 Dec 1993 09:10:29 -0800

| (1) Garbage-In or protocol errors: you are misusing this class:
| "you are feeding me garbage, please RTFM!"

One posibility: have class specific exceptions. ClassName.Error is the
standard exception for problems the class caught.

| (2) Unexpected Errors: "Sorry-This should not happen: I have a bug!"

Any other exceptions.

I agree that the exceptions can become unwieldy. Of course, it may be
beneficial to have a tree structure in the exceptions so you can create
exception categories and catch them given a category. There is nothing
in python that prevents you from doing so already. (Except for the lack
of protocol.)

It would even be better if the exceptions had more information in them,
such as whether the operation can be restarted or continued. Then we
also need some handle to restart or continue it. Possibly Guido is
already thinking in this area?

-Jaap-

--
Jaap Vermeulen					+--------------------------+
						| Sequent Computer Systems |
	Internet : jaap@sequent.com		| Beaverton, Oregon	   |
	Uucp	 : ...uunet!sequent!jaap	+--------------------------+