Author: bodewig
Date: Tue Sep 12 22:27:07 2006
New Revision: 442854

URL: http://svn.apache.org/viewvc?view=rev&rev=442854
Log:
unwrapping is no longer necessary, now that macrodef and TaskAdapter pass the 
exceptions unchanged

Modified:
    
ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java

Modified: 
ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java
URL: 
http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java?view=diff&rev=442854&r1=442853&r2=442854
==============================================================================
--- 
ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java
 (original)
+++ 
ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java
 Tue Sep 12 22:27:07 2006
@@ -152,20 +152,9 @@
             fail("Expected failed assetion");
         } catch (AssertionFailedException e) {
             assertEquals(message, e.getMessage());
-        } catch (BuildException e) {
-            // depending on the number of macrodef indirections, this
-            // can become arbitrarily deep
-            while (true) {
-                Throwable t = e.getCause();
-                assertNotNull(t);
-                assertTrue("nested is a BuildException",
-                           t instanceof BuildException);
-                if (t instanceof AssertionFailedException) {
-                    assertEquals(message, e.getMessage());
-                    break;
-                }
-                e = (BuildException) t;
-            }
+        } catch (Throwable t) {
+            fail("Unexpected exception of type " + t.getClass()
+                 + ", message '" + t.getMessage() + "'");
         } // end of try-catch
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to