Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Debugging PL/SQL

Re: Debugging PL/SQL

From: AMARENDRA B NETTEM <nettama_at_charlie.cns.iit.edu>
Date: 1997/02/16
Message-ID: <01bc1c16$cf2f67e0$7fa757c6@vanaja>#1/1

Hi mark,
  You can get line number and position from the     USER_ERRORS table

AMAR

-- 
    AMARENDRA B NETTEM
    ORACLE CONSULTANT
    WHITTMAN-HART INC., CHICAGO
    (http://www.iit.edu/~nettama)

Mark Adrian Pether <930722_at_bud.swin.edu.au> wrote in article
<5dohor$f2u$1_at_lucy.swin.edu.au>...

> Just a small problem, how does one extract the line number of a program
> exception. I'm wanting to write a debugging package which launches a
> procedure/function, but I want to handle the exceptions myself, ie. get
> exception line number and original source line (from user_source).
>
> SQLCODE, SQLERRM and dbms_utility.format_error_stack don't produce
> line number. Even if I have to trap some standard error or something
> and pull it apart token by token, there must be a way.
>
> Heres a demo of what code would do:
>
> declare
> procedure a is
> b number;
> begin
> b:= 9/0;
> end a;
> begin
> a;
> exception
> when others then
> display_lineno; ===> would print 5
> display_sourceline; ===> would print b:= 9/0;
> display_errormess; ===> print exception DIVIDE_BY_ZERO...
> end;
>
> I'm using Oracle v7.2 (PL v2.2), can I do the above?
>
> Any help greatly appreciated.
>
>
Received on Sun Feb 16 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US