Bug 973762

Summary: [RFE] UI Plugins - Support callback for detecting runtime errors originating from plugin code
Product: [Retired] oVirt Reporter: Vojtech Szocs <vszocs>
Component: ovirt-engine-webadminAssignee: Vojtech Szocs <vszocs>
Status: CLOSED WONTFIX QA Contact: bugs <bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, ecohen, iheim, mgoldboi
Target Milestone: ---Keywords: Improvement
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ux
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-16 15:28:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vojtech Szocs 2013-06-12 15:59:27 UTC
According to UI plugin lifecycle [1], if an uncaught exception escapes (originates) from plugin code due to the infrastructure being the initiator of the call (i.e. invoking specific plugin event handler function), this will be considered as internal error within the plugin code -- the infrastructure will remove such plugin from service (move plugin to FAILED state).

[1] http://www.ovirt.org/Features/UIPlugins#Plugin_lifecycle

This RFE aims to support error detection within the plugin code, i.e. introduce new event handler function that will be called by the infrastructure right before the plugin is removed from service due to uncaught exception.

For example:

api.register({
    UiInit: function() {
        // code might throw exception
    },
    PluginError: function(ex) {
        // process exception before being removed from service
        // this can be useful during plugin development
    }
});

We can also consider revisiting current approach of removing plugins out of service due to uncaught exception, i.e. swallow exception and let plugin stay in service.

Comment 1 Itamar Heim 2014-06-16 15:28:20 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.