Error handling on OpenVMS

Synergy DBL provides an exit handler on OpenVMS: LIB$SIGNAL and LIB$STOP issue program tracebacks when called from Synergy programs.

Important

You are responsible for setting a flag to make sure your exit handler is not re-entrant. If you don’t, an endless loop may occur if you get a Synergy DBL error in your handler. The Synergy debugger does not debug exit handlers, and a Synergy DBL exit handler may be invalid if the runtime exits abnormally. C and MACRO are the best languages for exit handlers.

When using LIB$SIGNAL, if you specify an error with a severity of success, warning, or informational, the exception handler will issue the error message and continue processing after the LIB$SIGNAL call. If you specify an error with a severity of fatal or error, or if you’re using LIB$STOP, the exception handler will issue a fatal “Unexpected VMS system error” (VMSERROR), followed by the signaled error and the Synergy DBL traceback.

Note

LIB$STOP will cause a fatal exit regardless of the severity of the error you specify.

If the compiler encounters a fatal system error when trying to open or access a file, it will report the associated system error text.

If an internal, untrapped, unexpected OpenVMS/RMS error occurs in a Synergy program, it will be loaded into the DCL $status symbol on exit from the program. The actual system error (not the VMSERROR number) will be loaded into $status. If any other Synergy DBL error occurs, it will be loaded into $status on exit.

The Synergy runtime uses asynchronous terminal output for better terminal performance. Therefore, Synergy DBL will report any I/O error, such as $ERR_DEVOFFLINE, on the next terminal input or output statement when the wait for previous I/O completion occurs.

Synergy programs may generate a “Failure during I/O operation” error ($ERR_IOFAIL) with the SS$_DATAOVERUN system error code if the type-ahead buffer is filled and the terminal is set “nohostsync.” (This is a normal OpenVMS error condition.) You can avoid this error by either trapping errors on your ACCEPT statements or ensuring that the terminal is set “hostsync.” If the terminal cannot be set “hostsync,” you can set the terminal “altype” to reduce the occurrence of this error.