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: How to get current program line number in exception?

Re: How to get current program line number in exception?

From: Sunil <sunil_franklin_at_hotmail.com>
Date: Wed, 24 Apr 2002 18:46:59 +0530
Message-ID: <diyx8.4$Cv2.110@news.oracle.com>


Will 'format_call_stack' help. It gives you the line number .

"Vasily Poushko" <vasily_at_genesyslab.ru> wrote in message news:aa6aar$hgi$1_at_octopus.co.ru...
> How to get current program line number in exception?
>
> Hello. I'd like to get current program line number, where raised
exception.
>
> My code is:
> create or replace procedure qqq
> as
> n varchar2(1) := '12';
> begin
> null;
> exception when others
> dbms_out.put_line(sqlerrm);
> end;
> /
>
> execute qqq;
>
> output will be:
> ORA-06502: PL/SQL: numeric or value error: character string buffer too
small
>
> but I would like to get:
> ORA-06502: PL/SQL: numeric or value error: character string buffer too
small
> ORA-06512: at "SCOTT.QQQ", line 2
> ORA-06512: at line 2
>
> How can I do this?
>
>
>
Received on Wed Apr 24 2002 - 08:16:59 CDT

Original text of this message

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