[vlc-devel] Announce: brand new python bindings (ctypes-based)

Rémi Denis-Courmont remi at remlab.net
Thu Jul 30 12:33:22 CEST 2009


On Thu, 30 Jul 2009 11:03:07 +0200, Olivier Aubert
<olivier.aubert at liris.cnrs.fr> wrote:
> - the (infamous for some) exception passing mechanism is quite useful to
> automatize error checking and reporting. Should the new API aim at
> removing exceptions in favor of more common idiom (return value/errno),
> it could be more cumbersome to translate automatically. Care should be
> taken here.

I found exception to be a mess both for exception-incapable languages (like
C), which is not a surprise. I found it also rather inconvenient for
exception-capable, as we anyway have return values.

My plan was to:
1/ get rid of the exception error code as it is nowhere used,
2/ use the return value of the function for error signaling,
3/ provide a per-thread error message to convey what's currently in the
exception.

Then, I'll remove exception completely. It's up to each bindings whether
they want to the convert error return and the error message into an
exception, or use a purely functional model.

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list