Hi Thomas, On Friday, April 1, 2011 9:27:56 PM UTC-4, Thomas Broyer wrote:
> Construct a ServerFailure from a given Throwable. You can then pass > specific "tokens" that your client code will be able to analyze (if needed), > but more importantly, you can tell whether the error should be considered > "fatal" or not (default implementation of onFailure in Receiver throws a > RuntimeException, but only if the ServerFailure is "fatal", which the > DefaultExceptionHandler always produces) > Wait, so there is already a DefaultExceptionHandler in place? So I *don't* need to install my own handler, construct ServerFailures, etc? > Assuming "requestContext" above actually is a Request (not a > RequestContext), that's abnormal. > > If you're indeed talking about a RequestContext (and your T should be read > as Void), then it's the normal behavior: the RequestContext-level Receiver's > onFailure will only be called if the server (more or less) failed to > deserialize the request or serialize the response. When processing service > method invocations, each service method's Receiver's onFailure can be > called, independently of the others, and the RequestContext-level Receiver's > onSuccess will be called in the end. > Ah, well that's my problem then. In many cases I'm firing on the context rather than on the request, because I have stacked up multiple calls, and I want them to fire as a group, rather than having to fire them all serially. There was a posting in this group a while back (hah, good luck finding it!) suggesting that this was the right pattern to use for that kind of thing. The use case I have in mind is an editor for a complex page having several text fields/drop-downs that are persisted to various tables in a DB. After the user clicks "save", I wanted all the changes to be saved (or fail to save, with error message) as a group. Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.