Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why isn't it catching it?
Hi wei,
To be on the safe end, you can try adding another exception, "WHEN OTHERS". This usually traps anything that fails suddenly.
EXCEPTION
WHEN NO_DATA_FOUND THEN
htp.p('Error: No data Found');
WHEN OTHERS THEN
htp.p('Error: The bug stops here');
Terrence
wweng_at_ei.org wrote:
>
> I have the following query:
>
> SELECT id INTO custid FROM www_cust.customer_data WHERE username = uname
> AND passwd = passwd;
>
> and the exception:
>
> EXCEPTION
>
> WHEN NO_DATA_FOUND THEN
> ....
>
> But somehow when there is no row returned, the exception is not being caught.
>
> Is there any explanation for this? And how can i fix it to let it catch
> the exception again?
>
> Thanks in advance.
>
> wei
Received on Tue May 11 1999 - 03:43:36 CDT