JavaScript exceptions

By default, when an error occurs, the script being executed is interrupted. Version 4.05 onwards does, however, enable you to capture errors and handle them in order to continue processing the script.

The exceptions raised by Adobe Campaign are error codes ( Number type).

Example

This example tries to recover a Web page from an invalid address and raises an exception from the getUrl() function.
try
{
  var url = "xx:/invalid-url"
  getUrl(url)
}
catch(e)
{
  logInfo("Can't get page content: " + url )
  logInfo("Error number: " + e )
}