Hi,

What are the good practices around exception handling in UUF in scenarios
like handling exceptions thrown when callOSGiService.

for example consider below method.

>     /**
>      * Check whether the notification based password recovery enabled
>      */
>
>     function isNotificationBasedPasswordRecoveryEnabled() {
>         var checkMethod = "isNotificationBasedPasswordRecoveryEnabled";
>         return
> callOSGiService("org.wso2.is.portal.user.client.api.RecoveryMgtService",
>             checkMethod, []);
>
>     }
>

If I don't catch exceptions within this method or whenever using
*isNotificationBasedPasswordRecoveryEnabled
*method, in the UI I get below page.


​What is the recommended way to handle this?

   1. Handle exceptions around callOSGiService.
      - Then we'll have to repeat the same whenever we call osgi from a uuf
      app
      2. Handle at method invocation, and redirect to error page.
   3. Provide a generic message in the UI from UUF in such cases, unless
   handled in the app.
   4. Do we have to handle exceptions from osgi service itself?
   5. Other?

​Thanks!
-Ayesha

-- 
*Ayesha Dissanayaka*
Software Engineer,
WSO2, Inc : http://wso2.com
<http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg>
20, Palmgrove Avenue, Colombo 3
E-Mail: [email protected] <[email protected]>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to