HHH-4822 - Made sure stacktrace is filled in for InvocationTargetException and IllegalAccessException

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18596 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Hardy Ferentschik 2010-01-20 21:22:09 +00:00
parent 373e4f13a8
commit 86989c157e
1 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,7 @@
package org.hibernate.test.annotations;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.sql.Connection;
@ -226,6 +227,14 @@ public abstract class TestCase extends junit.framework.TestCase {
closeSession();
throw t;
}
catch ( InvocationTargetException e ) {
e.fillInStackTrace();
throw e.getTargetException();
}
catch ( IllegalAccessException e ) {
e.fillInStackTrace();
throw e;
}
catch ( Throwable t ) {
closeSession();
if ( failureExpected ) {