Sample Text

How To Use DBMS_UTILITY.FORMAT_ERROR_BACKTRACE() in Oracle 11G

Sometimes , It is very difficult to find out unhandled Exception in a plsql block.
So today,
       I am going to explain One Dbms Utility that is called Format_Error_Backtrace.

So let me Explain First for plsql Developers.

PACKAGE :-

CREATE OR replace PACKAGE Test_Format_Error
IS
  PROCEDURE main;
END Test_Format_Error;

/
CREATE OR replace PACKAGE BODY Test_Format_Error
IS
 A Number:=5;
 B Number:=0;
 C Number;

  BEGIN
     C:=A/B;
     Dbms_Output.Put_Line('The Output is: '||C);

  EXCEPTION
    WHEN OTHERS THEN
              Dbms_Output.Put_Line('Exception is: '||'  '||DBMS_UTILITY.FORMAT_ERROR_BACKTRACE());
  END;
END Test_Format_Error;

/

Show Errors;
/


   Begin
      Test_Format_Error.main;
  
   End;


Output: -

   
       

No comments:

Post a Comment

Contact Form

Name

Email *

Message *