TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-160
#ERRORNUMBERS Built-In Variable
#ERRORNUMBERS Built-In Variable
Use #ERRORNUMBERS to get information about the most recent error detected by
your TACL.
Result
#ERRORNUMBERS returns a space-separated list of four integer numbers that
describe the most recent error. If the first number in the list is less than 1024, it is the
number of a file-system error or sequential I/O error. If the number is 1024 or larger, it
is a TACL error number. The other three numbers are used in certain cases to provide
additional information:
•
If a #NEWPROCESS operation is unsuccessful, the first number is 1149. The
second number indicates the specific error returned by the PROCESS_CREATE_
procedure. The third number contains error detail information from
PROCESS_CREATE_. The fourth number is not used.
•
If your TACL programs use #SET #ERRORNUMBERS in their exception handling,
the numbers will be whatever you set them to.
Considerations
•
When you first log on, #ERRORNUMBERS is initialized to 0 0 0 0.
•
All syntax errors (“Expecting . . . ”) set #ERRORNUMBERS to 1048 0 0 0.
•
Use #PUSH #ERRORNUMBERS (or PUSH #ERRORNUMBERS) to save a copy
of all your current error numbers.
•
Use #POP #ERRORNUMBERS (or POP #ERRORNUMBERS) to restore the four
error numbers from the copy last pushed.
•
Use #SET #ERRORNUMBERS (or SET VARIABLE #ERRORNUMBERS) to set
the four TACL error numbers to the desired values.
The syntax for #SET #ERRORNUMBERS is:
To create your own error categories, use any numbers in the space-separated list.
•
For more information about error messages, see the Guardian Procedure Calls
Reference Manual and the Guardian Procedure Errors and Messages Manual.
#ERRORNUMBERS
Note. D-series TACL returns 1149 for a process creation failure; C-series and earlier
RVUs of TACL return 1101.
#SET #ERRORNUMBERS n n n n