6. Always log error (and backtrace) before re-raising the exception.

Опубликовано: 29 Март 2016
на канале: Practically Perfect PL/SQL with Steven Feuerstein
3,433
20

When you re-raise an exception, you will reset the backtrace (the track back to the line on which the error was raised) and might change the error code (if you raise a different exception to propagate the exception "upwards").

So it is extremely important to call you error logging subprogram (see previous Good to Know) before you re-raise an exception.

Related blog post: http://stevenfeuersteinonplsql.blogsp...

========================================
Practically Perfect PL/SQL with Steven Feuerstein

Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.