Why don't you fill an issue or a pull request?? https://github.com/webpy/webpy/
On Tuesday, 10 July 2012 10:00:45 UTC-3, Chengliang Yan 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 view this discussion on the web visit https://groups.google.com/d/msg/webpy/-/vsphHMact9wJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
