Re: how to return errors from RequestFactoryServlet?

2011-04-04 Thread Thomas Broyer
On Monday, April 4, 2011 3:41:59 PM UTC+2, KaffeineComa wrote: > > > 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: t

Re: how to return errors from RequestFactoryServlet?

2011-04-04 Thread KaffeineComa
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 cons

Re: how to return errors from RequestFactoryServlet?

2011-04-01 Thread Thomas Broyer
On Saturday, April 2, 2011 3:08:16 AM UTC+2, KaffeineComa wrote: > > Hi Khiem, thanks for your reply. > > Are you saying that RequestFactoryServlet must be extended, and an > ExceptionHandler must be installed somehow? If so, what exactly does the > ExceptionHandler need to do? > Construct a S

Re: how to return errors from RequestFactoryServlet?

2011-04-01 Thread KaffeineComa
Hi Khiem, thanks for your reply. Are you saying that RequestFactoryServlet must be extended, and an ExceptionHandler must be installed somehow? If so, what exactly does the ExceptionHandler need to do? My server code is already throwing exceptions; it's just that they're not getting propagate

Re: how to return errors from RequestFactoryServlet?

2011-04-01 Thread khiem nguyen
u can extends requestfactoryservlet to use your exceptionhandler (which creates ServerFailure), (dont forget to put it in web.xml instead of the default requestfactoryservlet) when u throw exception on server, onFailure will be called, not exactly Exception/Throwable thou. there's a post about it

how to return errors from RequestFactoryServlet?

2011-03-31 Thread KaffeineComa
Like the asker of this question: http://stackoverflow.com/questions/5277084/handling-gwt-requestfactory-server-error-responses I'd like to be able to return errors to the front-end when RequestFactoryServlet encounters a problem. Thrown exceptions never seem to result in onFailure() or onViola