[IronPython] Load an Ironpython dump

Dino Viehland dinov at microsoft.com
Fri Apr 30 17:36:11 CEST 2010


You might changing the except to “except Exception:” to see if an exception other than SocketException is being thrown.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jon vs. python
Sent: Friday, April 30, 2010 2:57 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Load an Ironpython dump

I do believe that the problem lies in an assembly that's being used.
I'm running the script from IronPython Console, so I guess I'm not doing poor exception handling.

import timer
import fl

def main():
    mst = fl.FireLaser()
    def poll(src, args):
        try:
            mst.ReadBrokenFiber()
            mst.ReadZoneTemperature(3)
        except Sockets.SocketException:
            print "Poll operation failed"
            try:
                mst.reconnect()
            except Sockets.SocketException:
                print "Reconnect operation failed"
                #next iteration will do
                pass

    tmr = timer.MyTimer(5000,poll)
    tmr.start()
    mst.connect()


if __name__=="__main__":
    print "Module loaded from CLI"
    main()
On Fri, Apr 30, 2010 at 11:20 AM, Lukas Cenovsky <cenovsky at bakalari.cz<mailto:cenovsky at bakalari.cz>> wrote:
Run the program from command line and you should see the exception there.

--
-- Lukáš

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100430/1199292b/attachment.html>


More information about the Ironpython-users mailing list