Votes

Improve SAVE EXCEPTIONS in FORALL (details)
 
Dear Bryn,

I love PL/SQL and FORALL is nothing less than fantastic.

Could you make it even better by adding an ERROR_MESSAGE field to SQL%BULK_EXCEPTIONS that stores the error message? That way we won't lose critical information.

Thanks so much!

SAVE EXCEPTIONS in FORALL allows us to process each and every element in the binding collection, even if Oracle raises an exception along the way.

When FORALL is done, Oracle raises the -24381 error and fills up the SQL%BULK_EXCEPTIONS pseudo-collection of records with two pieces of information (fields) for every error encountered:

ERROR_INDEX - the index on which the error was raised. This points back to the binding collection
ERROR_CODE - the Oracle error code that was raised

That's all great -- EXCEPT that what Oracle should be doing is saving the error message; after all, it contains the error code, plus other, critical information. With just the error code, that information is lost.


Please add an ERROR_MESSAGE field to the SQL%BULK_EXCEPTIONS pseudo-collection and put the contents of DBMS_UTILITY.FORMAT_ERROR_STACK into that field.


Steven Feuerstein, PL/SQL Evangelist, Quest Software: "Help me help Oracle improve the PL/SQL language!"


Bryn Llewellyn: "We love to hear from PL/SQL developers. Let us know what is important to you!"

PL/SQL Obsession
Apex Evangelists
O'Reilly Books on Oracle
OTN PL/SQL Best Practices
OTN PL/SQL Page
Steven Feuerstein's Blog