21 Oct
2004
21 Oct
'04
3:18 p.m.
Catching *ANY* exception can cause inconsistencies in persistent data.
The "any" refers to "any type of exception" (i.e. not only "ConflictError"). It does (of course) not mean that any exception catching does (with necessity) result in inconsistent persistent data. That's why there is a "can" in the sentence above...
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?