<?xml version="1.0" encoding="UTF-8"?>











<rss version="2.0" xmlns:jf="http://www.jivesoftware.com/xmlns/jiveforums/rss">



<channel>
    <title>Support Forums: Message List - Easy and correct exception chaining</title>
    <link>http://www.theserverside.com</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    
        <generator>Jive Forums Silver 5.5.30 (www.jivesoftware.com)</generator>
    
    <pubDate>Tue, 18 Jun 2013 21:54:03 -0400</pubDate>


    <item>

        <title>Is it really that simple?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39537</link>

        

        
            <description><![CDATA[I believe I saw this same exact thing on the Bile Blog. (not that it ever gets read). However, I've seen some very cool uses of Java 5 with Exceptions. One of which is undoing the String message anti-pattern and using an enum instead. That allows the...]]></description>
        

        <pubDate>Thu, 11 May 2006 05:52:06 -0400</pubDate>

        

        <jf:creationDate>Thu, 11 May 2006 05:52:06 -0400</jf:creationDate>
        <jf:modificationDate>Thu, 11 May 2006 05:52:06 -0400</jf:modificationDate>
        <jf:date>May 11, 2006</jf:date>
        <jf:author>John Gagon</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Is it really that simple?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39537</link>

        

        
            <description><![CDATA[Saying something is bad style is pretty meaningless without a pragmatic reason.<br><br>However, I see now that I misunderstood what your code was doing, I thought you were defining an Exception class.  It would be nice to have some code formatting here,...]]></description>
        

        <pubDate>Mon, 27 Mar 2006 10:23:50 -0500</pubDate>

        

        <jf:creationDate>Mon, 27 Mar 2006 10:23:50 -0500</jf:creationDate>
        <jf:modificationDate>Mon, 27 Mar 2006 10:23:50 -0500</jf:modificationDate>
        <jf:date>Mar 27, 2006</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>0</jf:replyCount>
    </item>


    <item>

        <title>Is it really that simple?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39537</link>

        

        
            <description><![CDATA[While you could put the checks in a constructor that you own, I think throwing an exception in a constructor (almost as a side effect) is bad style.  The model I have in my head is that &quot;new SomeException()&quot; creates the exception.  It shouldn't...]]></description>
        

        <pubDate>Fri, 24 Mar 2006 15:38:13 -0500</pubDate>

        

        <jf:creationDate>Fri, 24 Mar 2006 15:38:13 -0500</jf:creationDate>
        <jf:modificationDate>Fri, 24 Mar 2006 15:38:13 -0500</jf:modificationDate>
        <jf:date>Mar 24, 2006</jf:date>
        <jf:author>Sam Shen</jf:author>
        <jf:replyCount>1</jf:replyCount>
    </item>


    <item>

        <title>Is it really that simple?</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39537</link>

        

        
            <description><![CDATA[Can't you just put this in the Exception constructor?<br><br>if (e instanceof RuntimeException) {<br>&nbsp;&nbsp;&nbsp;&nbsp;throw (RuntimeException) e;<br>} else if (e instanceof Error) {<br>&nbsp;&nbsp;&nbsp;&nbsp;throw (Error) e;<br>}]]></description>
        

        <pubDate>Thu, 23 Mar 2006 09:07:43 -0500</pubDate>

        

        <jf:creationDate>Thu, 23 Mar 2006 09:07:43 -0500</jf:creationDate>
        <jf:modificationDate>Thu, 23 Mar 2006 09:07:43 -0500</jf:modificationDate>
        <jf:date>Mar 23, 2006</jf:date>
        <jf:author>James Watson</jf:author>
        <jf:replyCount>3</jf:replyCount>
    </item>


    <item>

        <title>Easy and correct exception chaining</title>
        <link>http://www.theserverside.com/discussions/thread.tss?thread_id=39537</link>

        

        
            <description><![CDATA[The utility class Rethrow&lt;T extends Exception&gt; has a single method wrap(String msg, Throwable t) which does the following:<br><br>* Checks if t is a RuntimeException or Error, if so immediately rethrows the exception.<br>* Checks if t is already an...]]></description>
        

        <pubDate>Mon, 20 Mar 2006 15:28:57 -0500</pubDate>

        

        <jf:creationDate>Mon, 20 Mar 2006 15:28:57 -0500</jf:creationDate>
        <jf:modificationDate>Mon, 20 Mar 2006 15:28:57 -0500</jf:modificationDate>
        <jf:date>Mar 20, 2006</jf:date>
        <jf:author>Sam Shen</jf:author>
        <jf:replyCount>4</jf:replyCount>
    </item>



</channel>
</rss>

