Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Raise proper error if custom serialization handler fails #17470

Closed
asfimport opened this issue Sep 2, 2017 · 1 comment
Closed

[Python] Raise proper error if custom serialization handler fails #17470

asfimport opened this issue Sep 2, 2017 · 1 comment

Comments

@asfimport
Copy link

At the moment, the following fails:

def test_serializaton_callback_error():

    class TempClass(object):
            pass

    # Have a SerializationContext but TempClass is not
    # registered

    serialization_context = pa.SerializationContext()

    with pytest.raises(pa.SerializationCallbackError):
        serialized_object = pa.serialize(TempClass, serialization_context)

This is because serialize will raise a generic ArrowException instead of a SerializationCallbackError. We do need the latter because it contains the object that couldn't be serialized, which is important to give good error messages; in the case of Ray we sometimes want use the object to register additional serialization callbacks on the fly to make the user experience smoother.

Reporter: Philipp Moritz / @pcmoritz
Assignee: Philipp Moritz / @pcmoritz

Note: This issue was originally created as ARROW-1450. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Issue resolved by pull request 1029
#1029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants