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

Re-think checked SerializationException #5

Open
niloc132 opened this issue Feb 12, 2019 · 0 comments
Open

Re-think checked SerializationException #5

niloc132 opened this issue Feb 12, 2019 · 0 comments
Milestone

Comments

@niloc132
Copy link
Member

In the old API, this was a checked exception, so you had to catch it, but then caught and handed to AsyncCallback.onFailure or serialized it and sent it to the client. Currently the new implementation is catching it and converting it to an IllegalStateException, which is also lame, but for handling messages traveling either direction, we're a little limited without guaranteeing that the caller has specified a callback. Additionally, since serialization is uncoupled from the endpoint wiring, there isn't a guarantee that the other side will be generated anyway.

Some options (not exhaustive, might be helpful to use more than one):

  • Make it a runtime exception
  • Allow @SerializationWiring-annotated types to declare this as a throws and avoid try/catch wrap
  • Endpoints should explicitly catch this and route to local onError when reading, and just throw back out to calling code when writing
@niloc132 niloc132 added this to the 1.0 milestone Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant