<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Google Web Toolkit on Laliluna.de - Sebastian Hennebrüder</title><link>https://www.laliluna.de/tags/google-web-toolkit/</link><description>Recent content in Google Web Toolkit on Laliluna.de - Sebastian Hennebrüder</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 18 Dec 2009 00:00:00 +0000</lastBuildDate><atom:link href="https://www.laliluna.de/tags/google-web-toolkit/index.xml" rel="self" type="application/rss+xml"/><item><title>GWT tip - better exception logging on the server</title><link>https://www.laliluna.de/posts/gwt-tip-better-exception-logging-on-the-server/</link><pubDate>Fri, 18 Dec 2009 00:00:00 +0000</pubDate><guid>https://www.laliluna.de/posts/gwt-tip-better-exception-logging-on-the-server/</guid><description>&lt;p&gt;The &lt;span class="caps"&gt;GWT&lt;/span&gt; servlet is not very helpful considering exceptions of the server code. A nested exception gets hidden from the user. This can easily be improved by overriding the process method in a &lt;span class="caps"&gt;GWT&lt;/span&gt; servlet.&lt;/p&gt;&#10;&lt;pre class="lang-java"&gt;&#10;&#10;public class FooServiceImpl extends RemoteServiceServlet implements FooService {&#10;&#10;&#9;final Logger logger = LoggerFactory.getLogger(StockServiceImpl.class);&#10;&#10;// ...&#10; @Override&#10; public String processCall(String payload) throws SerializationException {&#10; try {&#10; return super.processCall(payload);&#10; } catch (RuntimeException e) {&#10; logger.warn("Service Layer threw exception: ", e);&#10; // normally bad style but we need to throw again to inform the client&#10; throw e;&#10; }&#10; }&#10;}&#10;&lt;/pre&gt;&#10;&lt;p&gt;Best Regards&lt;/p&gt;</description></item></channel></rss>