A sample code for Try/Catch statements in AX under run method in a class.
#OCCRetryCount
throw
Exception::UpdateConflictNotRecovered;
retry;
public void
run()
run()
{
#OCCRetryCount
try
{
}
catch (Exception::Deadlock)
{
retry;
}
catch (Exception::UpdateConflict)
{
if (appl.ttsLevel() == 0)
{
if (xSession::currentRetryCount() >=
#RetryNum)
#RetryNum)
{
throw
Exception::UpdateConflictNotRecovered;
}
else
{
retry;
}
}
else
{
throw Exception::UpdateConflict;
}
}
}