Thanks,Anand;)

在 2012年7月10日星期二UTC+8下午10时22分54秒,Anand写道:
>
> Looks good to me. Let me try it. 
>
> Anand 
>
> On Tue, Jul 10, 2012 at 6:30 PM, Chengliang Yan <kmov...@gmail.com> 
> wrote: 
> > I changed some lines of webpy code like this: 
> > 
> > code of trunk: 
> >>>>> 
> >     def handle_with_processors(self): 
> >         def process(processors): 
> >             try: 
> >                 if processors: 
> >                     p, processors = processors[0], processors[1:] 
> >                     return p(lambda: process(processors)) 
> >                 else: 
> >                     return self.handle() 
> >             except web.HTTPError: 
> >                 raise 
> >             except (KeyboardInterrupt, SystemExit): 
> >                 raise 
> >             except: 
> >                 print >> web.debug, traceback.format_exc() 
> >                 raise self.internalerror() 
> > 
> >         # processors must be applied in the resvere order. (??) 
> >         return process(self.processors) 
> > 
> > code i changed to: 
> > <<<< 
> >     def handle_with_processors(self): 
> >         def process_wrapper(processors): 
> >             try: 
> >                 return process(processors) 
> >             except web.HTTPError: 
> >                 raise 
> >             except (KeyboardInterrupt, SystemExit): 
> >                 raise 
> >             except: 
> >                 print >> web.debug, traceback.format_exc() 
> >                 raise self.internalerror() 
> > 
> >         def process(processors): 
> >             if processors: 
> >                 p, processors = processors[0], processors[1:] 
> >                 return p(lambda: process(processors)) 
> >             else: 
> >                 return self.handle() 
> > 
> >         return process_wrapper(self.processors) 
> > 
> > It solves the problem that apps' processors cann't catch exceptions of 
> > their code. 
> > Hope you can accept the code:) 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "web.py" group. 
> > To post to this group, send email to webpy@googlegroups.com. 
> > To unsubscribe from this group, send email to 
> webpy+unsubscr...@googlegroups.com. 
> > For more options, visit this group at 
> http://groups.google.com/group/webpy?hl=en. 
> > 
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/webpy/-/xNUBeYU9UYAJ.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to