At FORALL all exceptions raised during the execution are saved in the new cursor attribute %bulk_exceptions, which stores a collection of records. Each record has two fields. The first field, %bulk_exceptions(i).error_index, holds the &iteration& of the FORALL statement during which the exception was raised. The second field, %bulk_exceptions(i).error_code, holds the corresponding Oracle error code.

The values stored by %bulk_exceptions always refer to the most recently executed FORALL statement. The number of exceptions is saved in the count attribute of %bulk_exceptions, that is, %bulk_exceptions.count. Its subscripts range from 1 to COUNT.