setTearDownThrowable("cleanupPM", t);
}
if ((pmf == null || pmf.isClosed()) &&
(this.tearDownInstances.size() > 0 || this.tearDownClasses.size() > 0))
throw new JDOFatalException ("PMF must not be nullified or closed when tear down instances and /or classes have been added.");
if (pmf != null && pmf.isClosed())
pmf = null;
try {
if (cleanupData) {
localTearDown();
}
}
catch (Throwable t) {
setTearDownThrowable("localTearDown", t);
}
if (closePMFAfterEachTest) {
try {
closePMF();
}
catch (Throwable t) {
setTearDownThrowable("closePMF", t);
}
}
if (this.tearDownThrowable != null) {
Throwable t = this.tearDownThrowable;
this.tearDownThrowable = null;
if (testSucceeded) {
// runTest succeeded, but this method threw exception => error
throw new JDOFatalException("Exception during tearDown", t);
}
}
}