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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Q: any idea what are we missing ?

RE: Q: any idea what are we missing ?

From: Amihay Gonen <AmihayG_at_ectel.com>
Date: Wed, 20 Sep 2006 16:54:00 +0300
Message-ID: <5A841A20A9085A4C984EADD0FF97BF37962304@ectilex.ectel.com>

It is simpilfied code for complex code , it was just send in order to show an oracle strange behviour , the when calling function from select statement the exception NO_DATA_FOUND is not raised. While from PL\SQL code , it is raised.

Thanks for the comments .

-----Original Message-----
From: Mladen Gogala [mailto:mgogala_at_verizon.net] Sent: 20 September 2006 16:46
To: niall.litchfield_at_gmail.com
Cc: rjamya_at_gmail.com; Amihay Gonen; oracle-l_at_freelists.org Subject: Re: Q: any idea what are we missing ?

On 09/20/2006 08:53:54 AM, Niall Litchfield wrote:
> It isn't being raised, which I think is the point.
>
> I'd prefer if you expect an exception to deal with it, and otherwise
reraise
>

> 13 when others then
> 14 raise;
> 15* end tst;

There was a recent thread on Tom Kyte's blog devoted to the snippets like this one. OK, he
was specifically talking about the "WHEN OTHERS" not followed by "RAISE", but you aren't
doing anything here, you are catching an exception just to re-raise it in the next line.
What in the world makes you catch exceptions just to re-raise them? I would advise something
like this:

PRAGMA EXCEPTION_INIT(CONFUSE,-600); and then

WHEN OTHERS THEN
     RAISE CONFUSE;
END; That would be a great contribution to the clarity of the code and wouldn't cause
any confusion.

--
Mladen Gogala
http://www.mgogala.com


IMPORTANT: The contents of this email and any attachments are confidential and proprietary to ECtel Ltd. They are intended for the named recipient(s) only. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful.
If you have received this email in error, please notify us immediately by replying to the message and deleting it from your computer.
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Sep 20 2006 - 08:54:00 CDT

Original text of this message

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