
I add the below code to get financial dimension in a method of a class , the problem is that when the method (findByDimensionAttributeAndValue) throw an error the execution of the code is stopped although I have try have try, catch
When I move the logic to a job and execute it try and catch workers properly , can you please advise what should I do make try catch works in the method to avoid such interruption in the execution ?
Try
{
dimensionAttributeValue = dimensionAttributeValue::findByDimensionAttributeAndValue(dimensionAttribute,dimValue,false,true);
valueSetStorage.addItem(dimensionAttributeValue);
}
catch (Exception::Error)
{
info("Error");
}
*This post is locked for comments
I have the same question (0)Hi Maram fraij
This has most likely to do that your try - catch statement is already inside a transaction and that is not the case when you are running it in a job.
See this link for expection handling : msdn.microsoft.com/.../aa893385.aspx
Hope this helps
/Dan