Does anyone know if there is a replacement for any of the output vars from services in the WmDb/pub.db folder? We’re upgrading from 4.6 to 6.5 and I’m looking at replacing the use of WmDb/pub.db:insert with an Insert SQL adapter service.
The WmDb/pub.db:insert service in 4.6 returned several variables, including $errors (document) and $failCount (string). My 4.6 service flow code checks the $failCount var and appends and errors from $errors to a document list. These errors are collected throughout the flow as they happen and processing continues. At the end of the flow, the errors doc list is checked and any errors are displayed.
In 6.5, I’ve replaced the call to the insert service with an insert adapter service and am checking the result code returned by the adapter service. This works fine when verifying the insert was successful, but if there is an issue with the insert, a run time error is thrown and processing kicks out to my catch block.
Is there a way to suppress that error so it can be collected and displayed at a later time? I’m thinking I’ll need to write a try/catch block around the call to the insert adapter service, but wasn’t sure if there was an easier way to do this in 6.5.