[py-dev] Request for enhancing Exception handling in execnet
Carl Friedrich Bolz
cfbolz at gmx.de
Tue May 6 09:45:03 CEST 2008
Guido Wesdorp wrote:
> Gerard Petersen wrote:
>> Errors on the remote side are raised
>> as OSErrors and contain a textual version of the remote exception.
> They are actually raised as RemoteError
> (py.__.execnet.channel.RemoteError) instances, but I understand the
> frustration. The RemoteError instance doesn't hold a reference to the
> original error, which can be annoying.
>
> I think one of the problems could be that the remote exception may not
> be valid on the local machine: for instance if you import a library
> 'foo' that raises a (self-invented) FooException on the remote side,
> that library may not be available locally so it may be that FooException
> can not be instantiated/raised there. I'm not sure how to deal with this
> problem. I do know execnet has the possibility to pickle (?) and send
> over exceptions, though...
Execnet is using only marshal, afaik. However, it should be possible to
be at least a bit more informative and give RemoteError a name attribute
or so that gives the name of the remote exception class. Just giving
some message with traceback and everything makes it annoying to do
anything with the exception object programmatically.
Cheers,
Carl Friedrich
More information about the Pytest-dev
mailing list