Handling Exceptions

The OSGi interface BundleActivator is defined as:

   public interface BundleActivator {
     public void start(BundleContext context) throws Exception;
     public void stop(BundleContext context) throws Exception;
   }

The BaseBundleActivator class defined by SAT implements this interface and provides final implementations of the start(BundleContext) and stop(BundleContext) methods.

If an exception occurs while starting or stopping a bundle, SAT catches the exception and sends the bundle activator the handler hook method handleException(Exception) that is implemented by the BaseBundleActivator class as follows:

   protected boolean handleException(Exception exception) {
     return false;
   }