• Lynn,

    I think what you are looking for is the BEGIN ... EXCEPTION ... END; block in Oracle.

    There is some good information and examples here: http://www.techonthenet.com/oracle/exceptions/when_others.php

    And here is a link to the Oracle documentation on handling errors.

    As for the line number issue, it depends on your version, if you have 10g you are in luck, here is a link with some information: http://awads.net/wp/2006/07/25/how-to-find-where-an-error-was-raised-in-plsql/

    If you are using a version older than 10g then essentially you need to create a variable and update it throughout your procedure and then use that in the EXCEPTION block to report about where it happened.