try{
name = c.getName();
return c.newInstance();
} catch (final InstantiationException ie) {
logger.info(CMBStrings.get("cmb.loadingMBean5", name));
throw new CustomMBeanException(ie);
} catch (final IllegalAccessException iae) {
logger.info(CMBStrings.get("cmb.loadingMBean6", name));
throw new CustomMBeanException(iae);
} catch (final ExceptionInInitializerError eie) {
logger.info(CMBStrings.get("cmb.loadingMBean7", name));
throw new CustomMBeanException(eie);
}catch(Throwable t) {
// yes -- we are catching a Throwable here. Normally this is highly
// discouraged. But this is a special case. We are calling the user's
// code and he may be throwing a Throwable in the ctor...
String message = CMBStrings.get("cmb.newingMBean", c.getName(), t);
logger.warning(message);
throw new CustomMBeanException(message, t);
}
}