Details
-
Story
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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; } }