From: Geoffrey T. <gta...@na...> - 2002-03-19 18:12:36
|
You could write your own abort() method. This is completely untested, but you could try something like this. Add this code to your SitePage class: class AbortTransaction(Exception): pass class SitePage(Page): ... def abort(self): raise AbortTransaction def _respond(self): try: Page._respond(self) except AbortTransaction: pass - Geoff > -----Original Message----- > From: Edmund Lian [mailto:el...@in...] > Sent: Tuesday, March 19, 2002 1:08 PM > To: Geoffrey Talvola > Cc: 'Fionn Behrens'; web...@li... > Subject: RE: [Webware-discuss] Stopping servlet processing and > redirecting client > > > > Geoff wrote: > > >>Except that that only exits one function. If you're nested > in multiple > levels of function calls, it won't work the way you want it to.<< > > That's what I thought too... > > >>I think an "abort" method (not sure about the name) would be a great > idea. > It could raise an exception that would be caught at some > higher level. I > don't know what the proper level would be though. Maybe at the > Servlet.respond() level?<< > > Absent such a method at the moment, what options do we have to abort a > transaction now? > > ...Edmund. > |