Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » DEBUG PL Code from FORM (APEX 4.0)
DEBUG PL Code from FORM [message #648225] Thu, 18 February 2016 23:50 Go to next message
pcouas
Messages: 112
Registered: February 2016
Senior Member
Hi

i have page that calling an PL/SQL Code into an Package, when this procedure with 2000 lines failed, i ignore on which line. (i havent written proc with 2000 lines)
Could i debug line per line PL /SQL procedure when i use my form and obtain error line in PL/SQL ??

Regards
Phil
Re: DEBUG PL Code from FORM [message #648256 is a reply to message #648225] Fri, 19 February 2016 07:54 Go to previous message
geordibbk
Messages: 11
Registered: August 2015
Location: London
Junior Member
Hi Phil,
I can see you are having some difficulty describing the problem but it sounds like you want to pass the error from PL/SQL into your APEX page?

In APEX when you are calling your PL/SQL package code, wrap it in a block with an exception handler like this and put the error into an APEX error stack so it shows on the page:

begin
package.procedurename;
exception when others then
    apex_error.add_error  (
      p_message          => apex_escape.html( 'Error : '||sqlerrm ||' at '||dbms_utility.format_error_backtrace),
      p_display_location => apex_error.c_inline_in_notification  
    );
end;




Alternatively, you could log the error into a local table and debug like that.

[Updated on: Fri, 19 February 2016 10:11]

Report message to a moderator

Previous Topic: Region display selector problem
Next Topic: ORA-31011: XML parsing faile
Goto Forum:
  


Current Time: Fri Mar 29 04:05:45 CDT 2024