Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Better exception handling -- more #273

Open
ccleve opened this issue Jan 20, 2017 · 1 comment
Open

Better exception handling -- more #273

ccleve opened this issue Jan 20, 2017 · 1 comment
Milestone

Comments

@ccleve
Copy link

ccleve commented Jan 20, 2017

As a followup to #272,

When CopycatClient sends a request, you can process the response with client.submit(foo) .whenComplete(responseObject, errorObject) -> { // do stuff });

The errorObject doesn't always get populated properly.

If you do not have a method in your StateMachine that handles the Foo class, then the server sends an ERROR response, but the client never reports it in whenComplete().

If you throw a RuntimeException within your StateMachine method, an error does get reported to the client, but errorObject = ApplicationException and the type and message of the original exception are lost.

@kuujo
Copy link
Member

kuujo commented Jan 27, 2017

This has actually been fixed in Copycat 2.0, at least the issue of not reporting proper exceptions and messages has been. It's not clear yet whether the exceptions should be serialized and sent to the client or just the message. Currently, it's just the message with an ApplicationException. One could argue against serializing actual exceptions since they occur inside servers and not on the client.

@kuujo kuujo modified the milestone: 2.0 Mar 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants