Thursday, March 24, 2022

Exception Handling for Run Method in Runbase

 public void run()

    {

        System.Exception ex;

        #OCCRetryCount


        try

        {

            this.processData(); //Main logic


            Info("OperationCompleted");

        }

        catch (Exception::CLRError)

        {

            ex = CLRInterop::getLastException();

            error(ex.ToString());

        }

        catch (Exception::Deadlock)

        {

            retry;

        }

        catch (Exception::UpdateConflict)

        {

            if (appl.ttsLevel() == 0)

            {

                if (xSession::currentRetryCount() >= #RetryNum)

                {

                    throw Exception::UpdateConflictNotRecovered;

                }

                else

                {

                    retry;

                }

            }

            else

            {

                throw Exception::UpdateConflict;

            }

        }

    }

No comments:

Post a Comment

Sample Dialog Syntax - 1

 class AffiliationAutoAssignment extends RunBaseBatch {     // 1. Class Declaration and Pack variables     #define.CurrentVersion(1)     #de...