PLSQL代码调试Oracle dbms_utility返回错误
输出SQLCODE、SQLERRM 不能定位具体错误
推荐以下几种方法
1.dbms_utility.format_call_stack
This Function Formats The Current Call Stack. This Can Be Used On Any Stored Procedure Or Trigger To Access The Call Stack. This Can Be Useful For Debugging.
dbms_output.put_line(dbms_utility.format_call_stack);
2.dbms_utility.format_error_stack
This Function Formats The Current Error Stack. This Can Be Used In Exception Handlers To Look At The Full Error Stack.
dbms_output.put_line(dbms_utility.format_error_stack);
3.dbms_utility.format_error_backtrace
This Procedure Displays The Call Stack At The Point Where An Exception Was Raised, Even If The Procedure Is Called From An Exception Handler In An Outer Scope. The Output Is Similar To The Output Of The Sqlerrm Function, But Not Subject To The Same Size Limitation.
dbms_output.put_line(dbms_utility.format_error_backtrace);
--刘轶鹤