In your component editor (which implements com.engineous.desktop.sdk.ComponentEditor), all the methods are defined to throw SDKException (com.engineous.sdk.exception package). Your editor should handle all exceptions that it can, and any others should be wrapped into an IException and propagated to the framework. For example, your apply() method might resemble the following: public void apply() throws ISDKxception { try { // ... update the model using the model APIs, most of which // ... are defined to throw model exceptions, which are a type // ... of IException. } catch (SDKException me) { // API failure of some kind... we can propagate them up throw me; } catch (Exception ex) { // More likely my component's failure. Note we include the // failing exception in the new IException. throw new SDKException(ex, "My component failed during update of model."); } } The infrastructure will catch all exceptions propagated out of the component editor method, such as the editor’s apply() method. The infrastructure will notify the user of the failure through a modal dialog. |