How can I see the exception trace thrown out of the callback method
code ? When the web service returns, it throws an exception and
onFailure() method is invoked with the exception but how and where can
I see the exception trace? I am running this on tomcat, I can't run it
on dev hosted mode due to same origin policy restrictions. See the
code below:
userResource.store(id, new Result<User>() {
public void onFailure(Throwable caught) {
System.out.println("Error in submission ");
GWT.log(caught.getMessage(), caught);
caught.printStackTrace();
}
public void onSuccess(User v) {
System.out.println("Success = " + v.getName() );
}
});
--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
thanks for sharing
Michael
On Apr 14, 12:09 pm, Sripathi Krishnan <sripathikrish...@gmail.com>
wrote:
> In your RPC Servlet, override the doUnexpectedFailure(Throwable t) method
> and log the stack trace over there. GWT calls this method whenever there is
> a server side exception.
>
> @Override
> protected void doUnexpectedFailure(Throwable e) {
> LOGGER.error("Unexpected error while processing RPC", e);
> super.doUnexpectedFailure(e);
>
> }
>
> --Sri
>
> On 14 April 2010 14:10, dgiscool <dgisc...@gmail.com> wrote:
>
> > Hi,
>
> > How can I see the exception trace thrown out of the callback method
> > code ? When the web service returns, it throws an exception and
> > onFailure() method is invoked with the exception but how and where can
> > I see the exception trace? I am running this on tomcat, I can't run it
> > on dev hosted mode due to same origin policy restrictions. See the
> > code below:
>
> > userResource.store(id, new Result<User>() {
>
> > public void onFailure(Throwable caught) {
> > System.out.println("Error in submission ");
> > GWT.log(caught.getMessage(), caught);
> > caught.printStackTrace();
>
> > }
>
> > public void onSuccess(User v) {
> > System.out.println("Success = " +
> > v.getName() );
>
> > }
> > });
>
> > --
> > 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-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>