Hey all, I'm looking for a list of error types. In particular, I'm trying to find an error type that pertains to an empty sequence list. My app runs great when searching for names within a list, but let's say a user tries to find all names that start with 'Z'. Currently, there aren't any names that fit that search criteria. So, I have everything wrapped in a dtml-try. But the error_type that is returned is TypeError. The error_value is loop over non-sequence My question - there probably are other errors that fall under the TypeError error_type. I just want an error_type that is specific to this one particular error. So finding a list of available error_types would help me greatly. Unless, of course, someone just gives me the answer - but that wouldn't be too helpful in the future. Give a man a fish, and it will feed him for a day... Teach a man to fish, and it will feed him for a lifetime. Thanks in advance, Tommy Innovation: The Best Way To Predict The Future ... Is To Create It.
Hi Tommy, --On Donnerstag, 26. Juli 2001 11:45 -0800 Tommy Johnson <tommy@7x.com> wrote:
Hey all,
I'm looking for a list of error types. In particular, I'm trying to find an error type that pertains to an empty sequence list. My app runs great when searching for names within a list, but let's say a user tries to find all names that start with 'Z'. Currently, there aren't any names that fit that search criteria.
There is no Exception for an empty list. A list continues to be a list, even when it has no elements. If you get an error looping over non sequence, you dont have a sequence object (or - if you are using dtml it could be a string which is normally a sequence too but for security reasons not for dtml-in) If you get the value from a form, try <input type="text" name="valuename:list"> The :list makes a list even if there is only one element in the form.
So, I have everything wrapped in a dtml-try. But the error_type that is returned is TypeError. The error_value is loop over non-sequence
My question - there probably are other errors that fall under the TypeError error_type. I just want an error_type that is specific to this one particular error. So finding a list of available error_types would help me greatly.
While it is free to the programmer to use any Exception class she wants, this is not the case for this problem. There is no list other then whats documented in the python docs and in the documentation of the given module or class. As a programmer you can define as much exception classes and use them as you like.
Unless, of course, someone just gives me the answer - but that wouldn't be too helpful in the future.
Give a man a fish, and it will feed him for a day... Teach a man to fish, and it will feed him for a lifetime.
I think a good idea would be to get a bit familar with python. It is not so hard as it looks like at the beginning. You will then see why zope works like it works now. (http://www.python.org/ and see the tutorial at least) Regards Tino
What a difference lunch can make! Literally 10 minutes after lunch, I found my answer. For any that would like to know, a list can be found at http://www.python.org/doc/current/lib/module-exceptions.html Tommy Innovation: The Best Way To Predict The Future ... Is To Create It.
Hey all, I *know* I just saw this very recently, perhaps even on this list, but now I can't find the article (mini-HOWTO, README, or other) and I thought maybe someone has a link?? The text described a way to replace the root acl_users with another UserFolder (in my case an LDAPAdapter). Anyone have any ideas where I can find it? Thanks in advance, John -- John Ziniti Channing Laboratory Brigham and Women's Hospital 181 Longwood Avenue Brookline, MA 02115 john.ziniti@channing.harvard.edu
participants (3)
-
John Ziniti -
Tino Wildenhain -
Tommy Johnson