Cool! I already have a whole bunch of code that uses this sort of error checking, and I wanted to make sure that as long as I was careful to specify the errors I am trapping that I don't have to rewrite it all. Thanks.
-----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Thursday, October 21, 2004 1:44 PM To: Sean Hastings Cc: massimop@users.berlios.de; zope list Subject: RE: [Zope] adding properties trough pythonscript
Sean Hastings wrote at 2004-10-21 11:18 -0400:
...
def fooEdit(self,REQUEST): "foo is a string - foo2 is an int" self.foo = REQUEST.get('foo','') try: self.foo2 = int(REQUEST.get('foo2',0) except ValueError, e: self.foo2 = 0
Then could I say that this would be an example in which catching SOME exception CAN NOT result in inconsistent data?
You can :-)
-- Dieter