Something like this would also be useful for login pages and permission
denied errors.

On Tue, 2002-03-19 at 12:16, Geoffrey Talvola wrote:
> 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:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 19, 2002 1:08 PM
> > To: Geoffrey Talvola
> > Cc: 'Fionn Behrens'; [EMAIL PROTECTED]
> > 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.
> > 
> 
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
> 



_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to