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 -> exception messages...

exception messages...

From: GAB <news4_at_REMOVEbaxnet.net>
Date: 2000/06/03
Message-ID: <MPG.13a2c471d3194c5b989695@news.usenetserver.com>#1/1

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? Received on Sat Jun 03 2000 - 00:00:00 CDT

Original text of this message

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