// when the service was registered or the ServiceFactory object throws an exception,
// null is returned and a Framework event of type {@link FrameworkEvent#ERROR}
// containing a {@link ServiceException} describing the error is fired.
if (result == null) {
String message = "Cannot get factory value from: " + this;
ServiceException ex = new ServiceException(message, ServiceException.FACTORY_ERROR);
Thread.currentThread().setContextClassLoader(null);
LOGGER.error(message, ex);
}
} catch (Throwable th) {
String message = "Cannot get factory value from: " + this;
ServiceException ex = new ServiceException(message, ServiceException.FACTORY_EXCEPTION, th);
LOGGER.error(message, ex);
} finally {
factoryRecursion.remove();
}
} finally {