You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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):
@SerializationWiring
-annotated types to declare this as athrows
and avoid try/catch wrapThe text was updated successfully, but these errors were encountered: