Re: Exception compatibility with aliens
Antoine Pitrou <[email protected]> Thu, 19 Jan 2023 17:39:04 +0100
| Newsgroups | gmane.comp.python.devel,gmane.comp.lang.c++.isocpp.proposals |
|---|---|
| Message-ID | <20230119173904.00f90ff2@fsol> |
On Wed, 18 Jan 2023 12:04:41 +0200 Ville Voutilainen via Std-Proposals <[email protected]> wrote: > On Wed, 18 Jan 2023 at 11:45, Frederick Virchanza Gotham via > Std-Proposals <[email protected]> wrote: > > > > I have sent this email to two mailing lists for programming language > > proposals, the one for C++ and the one for Python. If you reply to > > this email, please make sure you reply to both. You can see the > > mailing list archives for this month for each list here: > > > > C++ : https://lists.isocpp.org/std-proposals/2023/01/date.php > > Python : https://mail.python.org/archives/list/[email protected]/2023/1/ > > > > Both C++ and Python have exception handling, however a C++ program > > which links with a Python library is unable to handle an exception > > thrown from Python. > > Perhaps you should just use > https://www.boost.org/doc/libs/1_81_0/libs/python/doc/html/index.html I would suggest taking a look at pybind11 for a potentially more modern design (also, free of boost dependencies). https://pybind11.readthedocs.io/en/latest/advanced/exceptions.html Regards Antoine.