Re: [std-proposals] Exception compatibility with aliens

Josh Engroff <[email protected]> Wed, 18 Jan 2023 18:54:27 -0500
Newsgroups gmane.comp.python.devel,gmane.comp.lang.c++.isocpp.proposals
Message-ID <[email protected]>
--===============7864387770896787997==
Content-Type: multipart/alternative;
 boundary=Apple-Mail-E87041D9-6B78-4580-9A25-DFDE71087039
Content-Transfer-Encoding: 7bit


--Apple-Mail-E87041D9-6B78-4580-9A25-DFDE71087039
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

Table this, perhaps?=20


> On Jan 18, 2023, at 5:04 PM, Barry Scott <[email protected]> wrote:
>=20
> =EF=BB=BF
>=20
>> On 18 Jan 2023, at 15:35, Frederick Virchanza Gotham <cauldwell.thomas@gm=
ail.com> wrote:
>>=20
>>> On Wed, Jan 18, 2023 at 3:07 PM Jason McKesson wrote:
>>>=20
>>> Also, this proposal seems to be missing the biggest issue with
>>> cross-language exception handling: the fact that you can't throw
>>> exceptions across languages. The only thing you *can* do is catch
>>> exceptions on the source language end, convert them into some data
>>> packet, and throw a different exception on the destination language
>>> side.
>>=20
>>=20
>> Yes this is what I had in mind. Behind the scenes, the C++ compiler
>> would catch the Python exception and then throw something that C++ can
>> deal with "such as std::aliens::python::exception".
>=20
> In PyCXX I allows exceptions to go into and out of python and C++.
> https://cxx.sourceforge.net/
>=20
> You can raise in C++ go into python and back into C++ and the exception ar=
rives as expected.
> You can riase in Python fo into C++ and back to Python and again the excep=
tion arrives as expected.
>  That is as long as its a python exception.
>=20
> Barry
>=20
>> _______________________________________________
>> Python-Dev mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
>> https://mail.python.org/mailman3/lists/python-dev.python.org/
>> Message archived at https://mail.python.org/archives/list/python-dev@pyth=
on.org/message/5OARJXOXYFXHTO2OBHUGFVFSQHOVPVPO/
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>=20
>=20
> _______________________________________________
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at https://mail.python.org/archives/list/python-dev@pytho=
n.org/message/NFUSVJB2N6FZVU23L2IVSCG3SN6DMINO/
> Code of Conduct: http://python.org/psf/codeofconduct/

--Apple-Mail-E87041D9-6B78-4580-9A25-DFDE71087039
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><div dir=3D"ltr"></div><div dir=3D"ltr">Tab=
le this, perhaps?&nbsp;</div><div dir=3D"ltr"><br></div><div dir=3D"ltr"><br=
><blockquote type=3D"cite">On Jan 18, 2023, at 5:04 PM, Barry Scott &lt;barr=
[email protected]&gt; wrote:<br><br></blockquote></div><blockquote type=3D"=
cite"><div dir=3D"ltr">=EF=BB=BF<meta http-equiv=3D"content-type" content=3D=
"text/html; charset=3Dus-ascii"><br><div><br><blockquote type=3D"cite"><div>=
On 18 Jan 2023, at 15:35, Frederick Virchanza Gotham &lt;cauldwell.thomas@gm=
ail.com&gt; wrote:</div><br class=3D"Apple-interchange-newline"><div><div>On=
 Wed, Jan 18, 2023 at 3:07 PM Jason McKesson wrote:<br><blockquote type=3D"c=
ite"><br>Also, this proposal seems to be missing the biggest issue with<br>c=
ross-language exception handling: the fact that you can't throw<br>exception=
s across languages. The only thing you *can* do is catch<br>exceptions on th=
e source language end, convert them into some data<br>packet, and throw a di=
fferent exception on the destination language<br>side.<br></blockquote><br><=
br>Yes this is what I had in mind. Behind the scenes, the C++ compiler<br>wo=
uld catch the Python exception and then throw something that C++ can<br>deal=
 with "such as std::aliens::python::exception".<br></div></div></blockquote>=
<div><br></div>In PyCXX I allows exceptions to go into and out of python and=
 C++.</div><div><a href=3D"https://cxx.sourceforge.net/">https://cxx.sourcef=
orge.net/</a><br></div><div><br></div><div>You can raise in C++ go into pyth=
on and back into C++ and the exception arrives as expected.</div><div>You ca=
n riase in Python fo into C++ and back to Python and again the exception arr=
ives as expected.</div><div>&nbsp;That is as long as its a python exception.=
</div><div><br></div><div>Barry</div><div><br><blockquote type=3D"cite"><div=
><div>_______________________________________________<br>Python-Dev mailing l=
ist -- [email protected]<br>To unsubscribe send an email to python-dev-l=
[email protected]<br>https://mail.python.org/mailman3/lists/python-dev.python.=
org/<br>Message archived at https://mail.python.org/archives/list/python-dev=
@python.org/message/5OARJXOXYFXHTO2OBHUGFVFSQHOVPVPO/<br>Code of Conduct: ht=
tp://python.org/psf/codeofconduct/<br><br></div></div></blockquote></div><br=
><span>_______________________________________________</span><br><span>Pytho=
n-Dev mailing list -- [email protected]</span><br><span>To unsubscribe s=
end an email to [email protected]</span><br><span>https://mail.pyt=
hon.org/mailman3/lists/python-dev.python.org/</span><br><span>Message archiv=
ed at https://mail.python.org/archives/list/[email protected]/message/NFU=
SVJB2N6FZVU23L2IVSCG3SN6DMINO/</span><br><span>Code of Conduct: http://pytho=
n.org/psf/codeofconduct/</span><br></div></blockquote></body></html>=

--Apple-Mail-E87041D9-6B78-4580-9A25-DFDE71087039--

--===============7864387770896787997==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline