Fwd: Re: [PyKDE] Mapping C++ exceptions to Python exceptions

Jon jjshome at ntlworld.com
Fri Feb 8 19:59:05 GMT 2002

----------  Forwarded Message  ----------

Subject: Re: [PyKDE] Mapping C++ exceptions to Python exceptions
Date: Fri, 8 Feb 2002 05:28:24 -0500 (EST)
From: Donovan Rebbechi <elflord at panix.com>
To: Jon <jjshome at ntlworld.com>

Could you CC this to the list ? It rejects my posts, and the admins of
the list server do not seem interested in fixing the problem.

There currently  isn't a way to do this. You need to use %MemberCode, use
a try/catch  block, and then use PyErr_SetString() or something to set up
a python  exception.

This would be a *very* useful feature. At present, anything that can throw
needs %MemberCode, because if an exception "escapes" a C++ call, the
interpreter aborts. At the very least, it might be worth having an option
for each function that puts the body code in a try {  } block to suppress



More information about the PyQt mailing list