cleaned up exception handling in the serialization test code

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137095 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sean Sullivan 2002-10-09 17:20:44 +00:00
parent 6200e1369f
commit 6faef5d8f0
1 changed files with 4 additions and 8 deletions

View File

@ -68,7 +68,7 @@
* Tests the org.apache.commons.lang.exception.NestableException class. * Tests the org.apache.commons.lang.exception.NestableException class.
* *
* @author <a href="mailto:steven@caswell.name">Steven Caswell</a> * @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
* @version $Id: NestableExceptionTestCase.java,v 1.6 2002/10/09 05:28:53 sullis Exp $ * @version $Id: NestableExceptionTestCase.java,v 1.7 2002/10/09 17:20:44 sullis Exp $
*/ */
public class NestableExceptionTestCase extends AbstractNestableTestCase public class NestableExceptionTestCase extends AbstractNestableTestCase
{ {
@ -247,6 +247,7 @@ public Class getThrowableClass()
} }
public void testSerialization() public void testSerialization()
throws java.io.IOException, ClassNotFoundException
{ {
RuntimeException nestedEx = new RuntimeException("nested exception message"); RuntimeException nestedEx = new RuntimeException("nested exception message");
NestableExceptionTester1 ex = new NestableExceptionTester1("serialization test", nestedEx); NestableExceptionTester1 ex = new NestableExceptionTester1("serialization test", nestedEx);
@ -286,11 +287,6 @@ public void testSerialization()
deserializedThrowable.getMessage()); deserializedThrowable.getMessage());
} }
} }
catch (Exception caughtEx)
{
fail("an unexpected exception occurred: "
+ caughtEx.toString());
}
finally finally
{ {
if (null != oos) if (null != oos)