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

Home -> Community -> Usenet -> c.d.o.tools -> Re: exception messages...

Re: exception messages...

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/06/03
Message-ID: <960038240.973.0.pluto.d4ee154e@news.demon.nl>#1/1

GAB <news4_at_REMOVEbaxnet.net> schreef in berichtnieuws MPG.13a2c471d3194c5b989695_at_news.usenetserver.com...
> I intentionally tried to insert a duplicate record, violating the prikey
> on rec A. I'm just trying to get to the point where I can trap these
> things as they happen at runtime, and deal with them effectively from my
> proc editor (I'm using SQL Nav by Quest s/w).
>
> So, it's something like this:
>
> Table A, column_one is prikey, of course no dupes.
>
> insert into A (column_one, column_two) values ('test', 'testing');
> --turn right around and do the same thing to purposely get the error
> insert into A (column_one, column_two) values ('test', 'testing');
>
> Now running it just shows "server threw an exception". When I figured
> it would. But I can't figure out what the execption actually is. So I
> did the following (this was some code from the Ora docs I found) :
>
> EXCEPTION
> WHEN NO_DATA_FOUND
> THEN
> NULL;
> WHEN OTHERS THEN
> err_num := SQLCODE;
> err_msg := SUBSTR(SQLERRM, 1, 100);
> INSERT INTO runtime_errors VALUES (err_num, err_msg);
> PLVexc.recNstop;
> END stoproc;
>
> Then this promptly blew up too, griping about lines being too long and
> such. Is it really that hard to just display an abend error with ORA?
>
>

No of course not, but as you don't post platform and version information and the *exact* output, the ng will be unable to help you out. Using a susbstr can be dangerous when the message is shorter and we don't have the definition of that error table nor of the procedure PLVexc.recNstop;

Regards,

Sybrand Bakker, Oracle DBA Received on Sat Jun 03 2000 - 00:00:00 CDT

Original text of this message

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