Runtime Errors


 

Upon the occurrence of an untrapped error, the system displays an error code giving the location immediately following the instruction that generated the error. The program then terminates. Most errors may be intercepted using a TRAP instruction to avoid abrupt program termination. Once an error is trapped, system error information may be interrogated through the S$ERROR$ common data variable to determine the cause of the problem. This variable contains the error code and location normally displayed by an untrapped error. Since it is a Common System Variable, S$ERROR$ does not need to be defined within the program.

 

Any error code generated by the executing code may be referenced in this help file to determine the type of problem involved.

 

An error message has the following format:

 

Zxxx aaaaaaaatnnnnn[:loadmod]

where:
Zxx
The error code. Z will be a single capital letter indicating the general class of the error. xx will be a unique two or three digit error number.
aaaaa
The hexadecimal address of the instruction following the instruction of error.
t
A blank indicates that the error data in S$ERROR$ was generated and stored for an untrapped program error. An asterisk indicates that the error data in S$ERROR$ was generated and stored for a TRAP action. An '@'-sign character indicates that the error data in S$ERROR$ was generated and stored for an EXCEPTSET action.
nnnnn
Extended error code further defining the error when possible. This is the actual code returned from the call to the operating system routines and is defined in the O/S Error Subcodes section.
loadmod
If the error occurs in a load module, the name of the load module PLC name with a leading ':' character is appended after the 'nnnnn' field.

 

Compiling a program using the `L' option produces a listing with both the source line number and the corresponding hexadecimal program address. By using this listing, the programmer can determine the statement causing the error. SUNDB86A, SUNDB86L, and PLBCMP generated code may also be interrogated through use of the interactive, on-line debugger facilities. SUNDB86M requires the use of options within the assembler to produce a listing with the locations of the instructions.

 

The runtime provides extended error data for disk instructions that indicates the position in the file where an error occurred. The format of the extended information is one of the following:

 

Error Message

Meaning

ISIRN:0xnnnnnnnn

File position in an ISI file where an OS read/write operation failed. This extended data applies to any IO errors directly related to OS read/write operations of an ISI file.

DDRN:0xnnnnnnnn

Deleted data record number retrieved from an ISI DDRN map that was determined to be pointing to a record that currently has data and is not deleted. This extended data applies to an I52 error.

WDRN:0xnnnnnnnn

Data record number/position determined from an ISI file header to be the location in the data file where to write the next record. This value does not point to the true end of file position for the TXT file. This extended data applies to an I52

 

Additionally, disk errors provide the file name associated with the file declaration that encountered the error. The following table indicates the file name provided:

 

File Variable Type

The file name reported will be the ...

AFILE

AAM file name.

FILE

ISAM file name.

IFILE

text file name.

 

The Visual PL/B runtime provides native Windows error codes to aid in problem resolution. The extended error information is identified in both the S$ERROR$ and the error dialog as 'WINERR:0xNNNNN'. NNNNN is the Windows native last error code. This extended information is subject to change without notice.

 

 

See Also: PL/B Errors

 



Compiler and Runtime Options Compiler Errors Initial Program Execution Errors