[C++-sig] A first glance at what could be the boost::python exception system

David Abrahams dave at boost-consulting.com
Fri Jul 26 17:47:55 CEST 2002


Berthold,

I'm sorry that I probably don't have time to look at this in detail before
Friday afternoon ends for you; I'll try to get to it over the weekend, and
to respond to your questions in full. It looks good overall. On a stylistic
note I'd like to see more separation of interface from implementation (i.e.
moving member functions outside the function body) and macros (yes, really)
could be used to cut down on code duplication. However, these are minor
details.

Thanks for your contribution,
Dave


-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com


----- Original Message -----
From: "Berthold Höllmann" <hoel at germanlloyd.org>
To: <c++-sig at python.org>
Sent: Friday, July 26, 2002 10:16 AM
Subject: [C++-sig] A first glance at what could be the boost::python
exception system


> Hello all,
>
> David asked if I coud implement the C++ wrapper system for the Python
> exception system. Now, it is friday afternoon again and I won't have
> time to work on this over the weekend. The only test I did was sending
> this through the compiler (g++ 3.1). How do I enable "str(exception)"
> doing someting meaningfull? Another facility that is missing is a
> routine checking for a set Python exception and returning/raising the
> apropriate C++ counterpart. Is there any idea how this could be
> accomplished without a huge set of if/else if's and in a way easy
> extensible for user defined exceptions? I tried to map the class
> hierarchy found with
>
> >python
> Python 2.2.1 (#3, Jun  4 2002, 09:47:49)
> [GCC 3.1] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import exceptions
> >>> help(exceptions)
>
> I left out the warnings, because I don't think they should be mapped
> to C++ Exceptions, but they could be added. I hope it's OK to attach
> "exceptions.hpp" and "exceptions.cpp".
>
> Greetings
>
> Berthold
>
>
>
> This email contains confidential information for the exclusive attention
> of the intended addressee. Any access of third parties to this email is
> unauthorized. Any use of this email by not intended recipients like
> copying, distribution, disclosure etc. is prohibited and may be
> unlawful. When addressed to our clients the content of this email is
> subject to the General Terms and Conditions of GL's Group of Companies
> applicable at the date of this email.
>
> GL's Group of Companies does not warrant and/or guarantee that this
> message at the moment of receipt is authentic, correct and its
> communication free of errors, interruption etc.
>





More information about the Cplusplus-sig mailing list