[Ironpython-users] Failing to catch exception

Jeff Hardy jdhardy at gmail.com
Fri May 8 09:15:20 CEST 2015


On Fri, May 8, 2015 at 7:18 AM,  <egroups at sowray.com> wrote:
> Thanks for that suggestion, Jeff.
>
> Unfortunately after upgrading to 2.7.5, the problem remains.
>

Dang, I was hoping this would be easy. :(

There are two possibilities that come to mind:
1) The exception types are coming from different versions of the same assembly
2) The exception types come from the same assembly loaded into
different contexts [1].

Both of these are a pain to debug. Your best bet is probably to set up
fuslogvw and check the logs to see if the Selenium assemblies are
being loaded twice.

What I don't get is why a bare except: doesn't catch it. Can you try
replacing the try contents with just 'raise NoSuchElementException()'
and see what happens?

- Jeff

[1] http://www.hanselman.com/blog/FusionLoaderContextsUnableToCastObjectOfTypeWhateverToTypeWhatever.aspx


More information about the Ironpython-users mailing list