CRE Programmer's Guide
CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
2-52
Language-Specific Error Handling
Although the TNS CRE does not determine the effects of, or suggest how to recover 
from, errors that occur in routines that your program invokes—for example, in string 
functions, math functions, and so forth—the messages in Section 10, Run-Time 
Diagnostic Messages, give you some guidance. Consult the language manual for the 
function that caused the error to determine the error’s effect and how to recover from 
the error.
Language-Specific Error Handling
When an error occurs in your program, its subsequent action depends on the language 
of the routine that caused the error. This subsection provides a brief overview of error 
handling for each of the languages supported by the CRE.
C Routines
If an error occurs in a CRE or run-time library function called from a C environment, the 
CRE returns control to the C run-time library. The C run-time library either: 
•
Calls the CRE to write a message to the standard log and then terminates the 
program.
•
Stores a predefined value in the special global variable errno, and returns control 
to your C function.
The CRE or the C run-time library terminates your program unconditionally if:
•
The C run-time library finds that its data is invalid or a logic error occurs.
•
If you specify the CHECK compiler pragma and a run-time check fails.










