[IronPython] Exception Model for modules implemented in C#

Slide slide.o.mix at gmail.com
Tue Jan 11 20:41:32 PST 2011


On Tue, Jan 11, 2011 at 8:54 AM, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Tue, Jan 11, 2011 at 7:14 AM, Slide <slide.o.mix at gmail.com> wrote:
> > Is there a document that describes how to implement a Python exception in
> a
> > C# module? In looking through the code, the exception stuff is seemingly
> in
> > about 20 different places and bringing it all together is not easy, at
> least
> > to the casual observer :-)
>
> I don't think there is. It's not too bad once you figure it out, but
> figuring it out is tricky, to say the least.
>
> You could look at
>
> https://bitbucket.org/jdhardy/ironpython.sqlite/src/95894443fffe/src/Exceptions.cs
> ,
> which has it all in one place for a fairly deep exception hierarchy.
> (`InitModuleExceptions` is called from `PerformModuleReload` in
> _sqlite.cs.) I just figured that out from reading the existing
> modules, but I'm thinking I should write a "module implementer's
> guide" with those sorts of lore in it. I thought there was one
> started, but now I can't find it.
>
> - Jeff
> _______________________________________________
>


That helped a ton, thanks for that! It IS much easier than I was thinking it
had to be. I had been looking at all the exception stuff in the IronPython
sources and some of the stuff that goes on in there is pretty crazy.

Thanks again,

slide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20110111/f34d2735/attachment.htm>


More information about the Users mailing list