• error handling in part of components tree

    By Fero Kossuth 1 decade ago

    I try to solve very common problem with our applications - when there is any problem in page, whole page fails and user gets error page. We have adopted rule to try/catch (and log) almost any code in XP/CC. But there are still places, where you can not use try/catch. One of them is described here: http://stackoverflow.com/questions/14409201/how-to-handle-design-errors-in-a-custom-control-in-xpages

    I think the problem is very frequent with datasources, especially when UNID provided does not exists or user is not allowed to see that document.

    This problem is very annoying for widget style controls - everything else could work, but that particular widget breaks whole page. What I am looking for is the way to handle any run-time error in component tree and render something like widgets in IBM connections (red box with explanation that loading the content of the widget failed).

    So, my question is - could you, PLEASE, provide extlib control similar to dynamicContent/switchFacet with behavior: if everything is fine, render facet X (property), but if there is any run-time error INSIDE of my component tree catch it, log it (method binding property), and render alternative facet Y (property)?

    Thanks!

    P.S.: name the component Admiral Ackbar :-)