Uploaded image for project: 'CloverDX'
  1. CloverDX
  2. CLO-18039

Try-catch block

    XMLWordPrintable

Details

    • Story
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • rel-5-6-0
    • Engine
    • Security Level: Users (General product issues)
    • 5
    • UNDECIDED
    • Green Sprint 103, Green Sprint 104

    Description

      In order to improve error handling at CTL2, introduce try-catch statement. If an exception is thrown by a statement in try block, then catch block is executed.

      try {
          //try block
      } catch (CTLException e) {
          //catch block
      }
      

      CTLException is of type record and have following fields:

      • sourceRow - integer
      • sourceColumn - integer
      • message - string - error message from the deepest/inner-most exception - i.e. the original reason for failure
      • cause - string - name of the exception which caused this
      • stackTrace - list[string] - hierarchy of function call frames on stack
      • exceptionTrace - list[string] - list of exception types from the top-most down to inner-most

      Try-catch blocks can be nested in other try-catch blocks:

      try {
          a = b/c;
      } catch (CTLException myex1) {
          try {
              a = b/d;
          } catch (CTLException myex2) {
              a = INT_CONSTANT;
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              slamam Martin Slama
              krivanekm Milan Krivanek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 7 hours
                  7h