On Friday, August 29, 2003, at 02:45 PM, Dietmar Schwertberger wrote:
I have some long running applets. If the user cancels the transfer I would
like to stop further execution.


I can see
 StreamOut Error: (10053, 'Software caused connection abort")
in the console window.

Can the applet get this information to cancel execution?

(I assume you mean servlets)


sleep() should be called regardless of any exceptions. So this should work (untested):

    def writeHTML(self):
        self.finishedLongThing = 0
        while 1:
            output = self.doSomethingLong()
            if not output: break
            self.write(output)
        self.finishedLongThing = 1

    def sleep(self, trans):
        if not self.finishedLongThing:
            self.killSomethingLong()

If the particular exception you're getting causes sleep() not to be called, then that's a bug.

Ian



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to