Hi All,
We have a strange problem which we am unable to solve.
We have some code which is running in batch using SysOperationFramework. This piece of code is called from StartOperation which calls the service menu item (textbook implementation).
When it is in batch we are getting throwing an error which we want to handle. If we handle the error by displaying a message then it will not error the batch job (which is something we need to do) To cause the batch to error we need to throw an error at the highest point and this will inform the batch and it will set its status to error, we have added additional code which will then go back to our transaction and update the information when there is an error in batch.
The problem we get here is that by throwing the error at the highest level, it has nowhere to go so throws a stack trace error to the infolog. Displaying stack trace errors to an info log will just cause users to panic so we don't want to do this, but there is no way to get the batch to error unless we throw an error.
Can anyone help? I know it is a confusing scenario but there has to be some way.
Thanks for any help
*This post is locked for comments