Hello guys,

I'm seeing some oddness in exception handling in asynchronous callbacks 
(including handlers attached to HTML events).

If I have the following code for example which raises an exception in a 
'click handler' on a xaml animation:


canvas = XamlReader.Load(xaml)
storyboard = canvas.FindName('Example')
storyboard.AutoReverse = True

def OnClick(sender, event):
    storyboard.Begin()
    print 'before'
    x = None
    try:
        x = int('hi')
    except Exception, e:
        print 'oops', e
        x = 3
    print 'after', x
   
canvas.MouseLeftButtonDown += OnClick


When I click I see the 'before' and 'after' prints (I have diverted 
stdout) - but the exception handling code never seems to be executed.

Michael
http://www.manning.com/foord
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to