IBM AS/400 manual Handling Exceptions, Exception Handling Overview

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 241
Image 241
Exception Handling Overview

Exception Handling Overview

Chapter 12. Handling Exceptions

This chapter explains how ILE RPG exception handling works, and how to

¹Exception handlers

¹ ILE RPG-specific handlers

¹ ILE condition handlers

¹Cancel handlers

ILE RPG supports the following types of exception handlers:

¹ RPG-specific handlers,

for

example,

the

use of an error indicator

tion code extender,

or a

*PSSR or

INFSR

error subroutine.

¹ILE condition handlers, user-written exception handlers that you reg

time using the ILE condition handler bindable API CEEHDLR.

¹ ILE cancel handler

which

can

be

used when

a procedure

ends

abno

Most

programs

benefit

from

some

sort

of

planned

exception handling

bec

can

minimize

the number of

unnecessary

abnormal

ends (namely,

those

as

with function checks). ILE condition

handlers also allow you to handle

mixed-language applications in a

consistent

manner.

You

can

use

the

RPG

exception

handlers

to handle most situations tha

in a RPG application. The minimum

level of exception handling which RPG

vides is

the

use

of

error

indicators

on certain operations. To lear

read

the following

sections

in

this

chapter:

¹ “ILE RPG Exception Handling” on page 220

¹“Specifying Error Indicators or the 'E' Operation Code Extender” on

Additionally, to learn how ILE exception handling works, read:

¹ “Exception Handling Overview” (for general concepts)

¹ “Using RPG-Specific Handlers” on page 226

¹The sections on error handlingILE Conceptsin .

For information on exception handling and the RPGILE cycle,RPG forseeAS/400

Reference.

Note: In this book the term 'exception handling' is used to refer to handling and error handling. However, for consistency with other terms, the term 'error' is used in the context of 'error indic subroutine'.

Exception Handling Overview

Exception

handling is the

process

of:

¹ Examining

an exception

message

which has been issued as a result

time error

 

 

¹Optionally modifying the exception to show that it has been rece handled)

Copyright IBM Corp. 1994, 1999

217

Page 241
Image 241
IBM AS/400 manual Handling Exceptions, Exception Handling Overview