5. Capture call stack, error code, error stack, error backtrace.

Veröffentlicht am: 07 März 2019
auf dem Kanal: Practically Perfect PL/SQL with Steven Feuerstein
7,093
67

Ideally, this is a total non-issue for you, because you simply invoke a generic logger procedure in your exception handlers (example and recommendation: download and use Logger, an open source utility that does almost anything and everything you can think of).

But if you are about to write your own (or are using a home-grown logging utility), make sure that you cal and store in your log (likely a relational table), the values returned by:

SQLCODE

DBMS_UTILITY.FORMAT_CALL_STACK (or corresponding subprograms in 12.1's UTL_CALL_STACK package) - answers question "How did I get here?"

DBMS_UTILITY.FORMAT_ERROR_STACK (or corresponding subprograms in 12.1's UTL_CALL_STACK package) - answers question "What is my error message/stack?" We recommend using this instead of SQLERRM.

DBMS_UTILITY.FORMAT_ERROR_BACKTRACE (or corresponding subprograms in 12.1's UTL_CALL_STACK package) - answers question "On what line was the error raised?"

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.


Auf dieser Seite können Sie das Online-Video 5. Capture call stack, error code, error stack, error backtrace. mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Practically Perfect PL/SQL with Steven Feuerstein 07 März 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 7,093 Mal angesehen und es wurde von 67 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!