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

Subject: Re: [PyKDE] Mapping C++ exceptions to Python exceptions
Date: Fri, 8 Feb 2002 05:28:24 -0500 (EST)
From: Donovan Rebbechi <[EMAIL PROTECTED]>
To: Jon <[EMAIL PROTECTED]>

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
exceptions.

--
Donovan

-------------------------------------------------------

_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde

Reply via email to