Hi Fathima, AFAIK that is because, when an exception get thrown inside the active method of a particular component( and if we don;t catch it), it will raise to the system level and cause the OSGi framework stops the startup process.
Thanks Thusitha On Wed, Apr 27, 2016 at 4:53 AM, Fathima Dilhasha <[email protected]> wrote: > 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 > > -- Thusitha Dayaratne Software Engineer WSO2 Inc. - lean . enterprise . middleware | wso2.com Mobile +94712756809 Blog alokayasoya.blogspot.com About http://about.me/thusithathilina
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
