Hi,

I am developing a tool which requires an OSGI service to be registered. I
am trying to handle any exceptions occurring at the registration of
service.
(Refer the following code snippet)

..
try {
   ...
   bundleContext.registerService(RoleMgtConfiguration.class.getName(),
configuration, null);
   ...
} catch (Throwable e) {
   log.error("Error while activating Role Management Common bundle", e);
}


AFAIU, the 'registerService' is throwing only exceptions. Is there a
particular reason to use 'Throwable' ?

AFAIK, Throwable might catch JVM related errors as well.

WDYT?

Thanks & Regards,
Dilhasha

-- 
Fathima Dilhasha
*Software Engineer*
Mobile : +94 (0) 771663314 <%2B94%20%280%29%20773655496>
<%2B94%20%280%29%20773%20451194>
[email protected] <[email protected]>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to