Votes

Pass exceptions as arguments (details)
 
Dear Bryn,

I love PL/SQL and would also love to see error handling strengthened by letting me pass an exception as an argument in a program.

I could write much more generic and flexible error management code this way.

The EXCEPTION datatype is a strange creature in PL/SQL. You can declare exceptions like variables, but you can only reference those exceptions in RAISE statements and in WHEN clauses.


If we could pass exceptions as arguments to parameters, we could much more easily write generic error management programs.


DECLARE
   my_exception EXCEPTION;
BEGIN
   RAISE my_Exception;
EXCEPTION 
   WHEN OTHERS 
   THEN
      handle_error (my_exception);
END;


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