<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: GWT Dynamic Exception Handling</title>
	<atom:link href="http://www.roussev.org/2010/02/gwt-dynamic-exception-handling/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.roussev.org/2010/02/gwt-dynamic-exception-handling/</link>
	<description>a Web Developer creating elegant aesthetic software</description>
	<lastBuildDate>Tue, 16 Feb 2010 09:25:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: atanas</title>
		<link>http://www.roussev.org/2010/02/gwt-dynamic-exception-handling/comment-page-1/#comment-1175</link>
		<dc:creator>atanas</dc:creator>
		<pubDate>Wed, 10 Feb 2010 16:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.roussev.org/?p=625#comment-1175</guid>
		<description>Good catch. Thanks.</description>
		<content:encoded><![CDATA[<p>Good catch. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin De Wulf</title>
		<link>http://www.roussev.org/2010/02/gwt-dynamic-exception-handling/comment-page-1/#comment-1168</link>
		<dc:creator>Martin De Wulf</dc:creator>
		<pubDate>Wed, 10 Feb 2010 09:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.roussev.org/?p=625#comment-1168</guid>
		<description>Oops, the right code is : 
if (cause.getClass().equals(MyException.class)) {
MyException myException = (MyException) cause;
writeError(myException);
return;</description>
		<content:encoded><![CDATA[<p>Oops, the right code is :<br />
if (cause.getClass().equals(MyException.class)) {<br />
MyException myException = (MyException) cause;<br />
writeError(myException);<br />
return;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin De Wulf</title>
		<link>http://www.roussev.org/2010/02/gwt-dynamic-exception-handling/comment-page-1/#comment-1167</link>
		<dc:creator>Martin De Wulf</dc:creator>
		<pubDate>Wed, 10 Feb 2010 09:25:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.roussev.org/?p=625#comment-1167</guid>
		<description>I did not see this post at first, only the previous one. 

Your solution is nice, even if I do not mind having my exception declared in my servlet. That said, I would suggest to replace : 

 if (cause.getClass().equals(MyException.class)) {
      writeError(new MyException());
      return;

by :

if (cause.getClass().equals(MyException.class)) {
      MyException myException = (MyException) cause;
      writeError(cause);
      return;

That way, you will not loose the message or custom fields of your MyException.</description>
		<content:encoded><![CDATA[<p>I did not see this post at first, only the previous one. </p>
<p>Your solution is nice, even if I do not mind having my exception declared in my servlet. That said, I would suggest to replace : </p>
<p> if (cause.getClass().equals(MyException.class)) {<br />
      writeError(new MyException());<br />
      return;</p>
<p>by :</p>
<p>if (cause.getClass().equals(MyException.class)) {<br />
      MyException myException = (MyException) cause;<br />
      writeError(cause);<br />
      return;</p>
<p>That way, you will not loose the message or custom fields of your MyException.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
