This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 15, 2012, 7:36 AM
26 Posts

How to implement Error handling (just like LS) in SSJS

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: Error handling
  • Replies: 1
Can anyone tell me on how to  implement Error handling in SSJS, just like the On error in LotusScript.
 
Regards,
Pranesh
Jun 15, 2012, 7:55 AM
126 Posts
Re: How to implement Error handling (just like LS) in SSJS
if your using event handlers, select it and view all properties in designer, there are 3 events "onComplete", "onError", "onStart" that can be used.
 
if you mean raw SSJS somewhere on a page, its the same as standard JS 
 
try 
{
   // code that will throw error
catch(err) 
{
   // some code to handle, e.g. redirect to page that has error message, try something else etc.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal