undeclared Exceptions

3 views
Skip to first unread message

hbonpard

unread,
Jul 8, 2010, 4:10:39 AM7/8/10
to gwt-sl
Hi guys, i am using GWTSpringController for my services on the server-
side. I always get this message
"com.google.gwt.user.client.rpc.StatusCodeException: The call failed
on the server; see server log for details", when an exception is not
declared in the signature of my service interface.

I want to obtain a better message. If my service for example throws a
NullPointerException , i want to catch it and let the user see the
exception and its backstrace, without adding it in the service
interface.

Any advice is appreciated.

Thanks and Best rgds.

Henri Bonpard.

George Georgovassilis

unread,
Jul 8, 2010, 9:14:16 AM7/8/10
to gwt...@googlegroups.com
Hello Henri,

I can't think of an easy way with the GWTSpringController. However, if I
can get you interested in the GWTRPCServiceExporter then you might get
what you want with the "throwUndeclaredExceptionToServletContainer"
property.

hbonpard

unread,
Aug 5, 2010, 9:56:53 AM8/5/10
to gwt-sl
Thank you! I used the GwtHandler and it also works.

On 8 Jul., 15:14, George Georgovassilis <g.georgovassi...@gmail.com>
wrote:

hbonpard

unread,
Aug 10, 2010, 9:20:28 AM8/10/10
to gwt-sl
Hi,

i now want to catch an exception before it reach the console so that i
can get the error message and do it finer . For that, i think i have
to implement the MethodInterceptor, but i will not have a the
exception. Kann somebody give me please an example or tell me how i
can reach that?

Thanks.


Henri Bonpard.
On 8 Jul., 15:14, George Georgovassilis <g.georgovassi...@gmail.com>
wrote:

George Georgovassilis

unread,
Aug 10, 2010, 9:28:16 AM8/10/10
to gwt...@googlegroups.com
Hello Henri,

In the case of the GWTHandler you will have to implement a RPCServiceExporterFactory and essentially provide your own implementation of a GWTRPCServiceExporter to the GWTHandler through that factory.

In the case where you already are using an GWTRPCServiceExporter you can override one of the many handlyXYZexception methods.
Reply all
Reply to author
Forward
0 new messages