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

Home -> Community -> Usenet -> c.d.o.misc -> Re: trapping pl/sql errors with line numbers

Re: trapping pl/sql errors with line numbers

From: Martin Burbridge <pobox002_at_bebub.com>
Date: Fri, 20 Jun 2003 00:08:30 GMT
Message-ID: <Xns939FCCAFC953Fpobox002bebubcom@204.127.204.17>


"Jeff Smith" <jsmit234 at ford dot com> wrote in news:bcs9ov$svi6_at_eccws12.dearborn.ford.com:

> I have been searching docs and sites but no luck.
>
> When catching unhandled errors in PL/SQL procedures using 8.1.7, is
> there any internal function that can record the line number that
> failed?
>
> If caught in an WHEN OTHERS THEN exception block, we record the
> SQLCODE, but it would be nice to know what line failed. Having the
> line from all_source would make it easier to debug.
>
> Regards,
> Jeff
>

If you remove the when others exception the calling program, java, sqlplus, etc gets the full error and line number at which it occurs. If you don't expect the error why would you attempt to handle it?

-- 
Martin Burbridge
Received on Thu Jun 19 2003 - 19:08:30 CDT

Original text of this message

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