JavaScript Rules File and Exceptions

Posted by Admin on 09-Oct-2008 10:02

Hello All,

We are currently using the JavaScript Rules file within our XMLTransformation calls.

However, if errors occur in the JavaScript an Exception is thrown(good). We use the try/catch around the code, so we know when the exception happens, but we would like to know how to throw a XQMessage or XQService exception which the XML Transformation service will catch.

Otherwise the message just passes through to the next service call in the process...

", "text/xml");

paramsHashMap.put("test1", XQ_getXPath("/", 0, "").getFirst());

paramsHashMap = new java.util.HashMap();

transform = getProcessSrc() + "/eBillingAuditProcess/BuildSelectInsert.xsl";

msgPart = new java.lang.Integer(0);

myArray.add(transform);

myArray.add(msgPart);

myArray.add(paramsHashMap);

return myArray;

}

catch(ex)

{

XQ_logInformation("Failed performSQL_Insert in eBilling Audit Process!!!");

// throw new java.lang.Exception("derek test");

return null;

}

All Replies

Posted by Admin on 28-Dec-2008 16:26

Basically the answer is...

throw "Failed on js call transform.." + ex;

Thanks,

Derek

This thread is closed