- Rexx - Web Programming
- Rexx - Reginald
- Rexx - Graphical User Interface
- Rexx - Best Programming Practices
- Rexx - Performance
- Handheld & Embedded
- Rexx - Databases
- Rexx - Brexx
- Rexx - Netrexx
- Rexx - Implementations
- Rexx - Instructions
- Rexx - Extended Functions
- Rexx - Portability
- Rexx - Object Oriented
- Rexx - Error Handling
- Rexx - Debugging
- Rexx - Signals
- Rexx - Parsing
- Rexx - Regina
- Rexx - XML
- Rexx - System Commands
- Rexx - Built-In Functions
- Rexx - Subroutines
- Rexx - Functions For Files
- Rexx - File I/O
- Rexx - Stacks
- Rexx - Functions
- Rexx - Strings
- Rexx - Numbers
- Rexx - Decision Making
- Rexx - Loops
- Rexx - Arrays
- Rexx - Operators
- Rexx - Variables
- Rexx - Datatypes
- Rexx - Basic Syntax
- Rexx - Installation of Plugin-Ins
- Rexx - Installation
- Rexx - Environment
- Rexx - Overview
- Rexx - Home
Rexx Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Rexx - Error Handpng
Rexx has the abipty to also work on Error handpng as in other programming languages.
The following are some of the various error conditions that are seen in Rexx.
ERROR − This even is raised whenever a command which is sent to the operating system results in an error.
FAILURE − This even is raised whenever a command which is sent to the operating system results in a failure.
HALT − This is normally raised whenever an operation is dependent on another operation. An example is if an I/O operation is being halted for any reason.
NOVALUE − This event is raised when a value has not been assigned to a variable.
NOTREADY − This is raised by any I/O device which is not ready to accept any operation.
SYNTAX − This event is raised if there is any syntax error in the code.
LOSTDIGITS − This event is raised when an arithmetic operation results in a loss of digits during the operation.
Trapping Errors
Errors are trapped with the help of the signal command. Let’s take a look at the syntax and an example of this.
Syntax
signal on [Errorcondition]
Where,
Errorcondition − This is the error condition which is given above.
Example
Let’s take a look at an example on this.
/* Main program */ signal on error signal on failure signal on syntax signal on novalue beep(1) signal off error signal off failure signal off syntax signal off novalue exit 0 error: failure: syntax: novalue: say An error has occured
In the above example, we first turn the error signals on. We then add a statement which will result in an error. We then have the error trap label to display a custom error message.
The output of the above program will be as shown below.
An error has occurred.
An example of error codes is shown in the following program.
/* Main program */ signal on error signal on failure signal on syntax signal on novalue beep(1) exit 0 error: failure: syntax: novalue: say An error has occured say rc say signal
The output of the above program will be as shown below.
An error has occured 40 6Advertisements