if (cm != previousCM)
cm.cleanupOnError(StandardException.closeException());
} catch (Throwable t) {
StandardException se;
// ensure that the severity will shutdown the service
if ((t instanceof StandardException) && (((StandardException) t).getSeverity() == ExceptionSeverity.DATABASE_SEVERITY))
se = (StandardException) t;
else
se = Monitor.exceptionStartingModule(t);
if (cm != previousCM) {
cm.cleanupOnError(se);
}
if (ts != null) {
ts.shutdown();
synchronized (this) {
services.removeElement(ts);
}
// Service root will only have been created if
// ts is non-null.
boolean deleteOnError = (properties !=null ?
properties.getProperty(Property.DELETE_ROOT_ON_ERROR) !=null:false);
if (create || deleteOnError)
provider.removeServiceRoot(serviceName);
}
Throwable nested = se.getCause();
// never hide ThreadDeath
if (nested instanceof ThreadDeath)
throw (ThreadDeath) nested;