Using V6 exception compatibility
You can set the v60ExceptionCompatibility program property to YES to revert to the exception handling behavior of EGL version 6.0. See v60ExceptionCompatibility.
If you migrate code from version 6, EGL automatically sets the v60ExceptionCompatibility property to YES. Note that it is possible to set this property to different values in different programs within a run unit, but this practice is dangerous.
If the run unit contains no migrated code, V6 exception mode is not recommended for new code development.
If you set v60ExceptionCompatibility to
YES,
you can access the sysVar.errorCode system
variable
after most system function calls (calls to libraries such as the EGL
mathLib
or sysLib libraries). Outside of V6 exception mode, the value of sysVar.errorCode is
undefined in these circumstances. To access sysVar.errorCode after
a system function call, you must perform one of the following actions:
- Enclose the function call where the error occurs within a try block
- Set the vgVar.handleSysLibraryErrors system variable to 1 (see handleSysLibraryErrors)
If an error occurs in the following circumstances, the program
will end
immediately:
- You are in V6 exception mode.
- The error occurs outside a try block.
- vgVar.handlesysLibraryErrors is set to 0.
If you are running in V6 exception mode,
a hard I/O error causes the program
to exit unless the error occurs within a try block
and you also set one of the following variables to 1:
- vgVar.handleHardIOErrors causes EGL to handle hard I/O errors on any I/O call (including those involving DL/I records)
- dliVar.handleHardDLIErrors causes EGL to handle only those hard I/O errors that reference records with the DLISegment stereotype.