13 Oct
2007
13 Oct
'07
7:33 p.m.
--On 13. Oktober 2007 21:30:05 +0200 Sascha Welter <zopelist@betabug.ch> wrote:
Hello Zopistas!
This pattern here is very common in many people's Zope products:
try: u=self.DestinationURL() except: u=REQUEST['URL1']
All those people should burn ...
It's usually in the manage_addXY() method, when all the work is done, we test for REQUEST!=None and we want to know where to redirect to.
Is there a reason for that bare except here? Wouldn't except AttributeError: ... do the job just as well?
Basically yes - unless the method being called might raise other errors as well. -aj