[Python.NET] catching exceptions thrown from .Net

Brian Lloyd brian at zope.com
Tue Jul 5 17:16:59 CEST 2005


Hmm, you mention RC5 -- do you mean RC2? An example code snippet would
help here, as the unit tests actually use NullReferenceException and they
are
running fine for me...



Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716
Zope Corporation   http://www.zope.com


  -----Original Message-----
  From: Mathew Yeates [mailto:mathew at yeates.tv]
  Sent: Tuesday, July 05, 2005 9:41 AM
  To: Brian Lloyd
  Cc: pythondotnet at python.org
  Subject: Re: [Python.NET] catching exceptions thrown from .Net


  yes, it inherits from System.Exception. In fact, I tried throwing a
NullRefernceException from my dll. Still nothing.

  Mathew

  Brian Lloyd wrote:
Is this  supposed to work in RC5 on Win32 using the supplied python
binary? I have a .Net dll which throws a user defined exception but its
being ignored by my python code.

Is this to be expected?

Mathew

Does the user defined exception inherit (eventually) from
System.Exception? If so, it should work...


Brian Lloyd        brian at zope.com
V.P. Engineering   540.361.1716
Zope Corporation   http://www.zope.com




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20050705/f280462a/attachment.htm


More information about the PythonDotNet mailing list