I've run into several greedy except: clauses now, and have submitted patches to make them a little less greedy. Out of curiosity, I searched the Zope source for "unfiltered" except: clauses... % grep -rl "except:$" . |wc -l 102 ... erk Just picking some of the results of that search at random, I noticed places where underlying exceptions could be eaten where I'm sure they'd be better propogated up... BTW, I did that little search above when I had a stupid (read: cut'n'paste :) bit of code that recursed on itself. Python generates a RuntimeError when that happens. I didn't get the RuntimeError. Zope simply quit on me with no error message. I have no idea where the RuntimeError is being caught, but I would strongly argue that it shouldn't be! I'm willing to have a go at cleaning some of those except: clauses up, but I can't possibly do 102 of them (I have a product dealine coming up :) Richard -- Richard Jones richard@bizarsoftware.com.au Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)
richard@bizarsoftware.com.au wrote I've run into several greedy except: clauses now, and have submitted patches to make them a little less greedy. Out of curiosity, I searched the Zope source for "unfiltered" except: clauses... % grep -rl "except:$" . |wc -l 102
... erk
Erk and a lot. This is a major major pain in the backside - e.g. the one in MailHost that just eats template rendering errors.
I'm willing to have a go at cleaning some of those except: clauses up, but I can't possibly do 102 of them (I have a product dealine coming up :)
Is it the sort of thing where it's just work putting a list of all of them (line numbers, &c) up on a web page, maybe crosslinked into cvsweb? Then people can go and pick them off, one at a time. Anthony
participants (3)
-
Anthony Baxter -
Chris McDonough -
richardï¼ bizarsoftware.com.au