Re: Designer 2.1.2: Exception in stored procedures.

From: Roy Brokvam <roy.brokvam_at_conax.com>
Date: Tue, 27 Apr 1999 09:35:06 +0200
Message-ID: <BNdV2.53$ZU2.410_at_news1.online.no>


Michael Efis wrote in message <37255B98.327109DD_at_cbr.spb.ru>...
>Designer 2.1.2: Exception in stored procedures.
>
>I have migrated from Designer 2.1 to 2.1.2 and faced the following
>problem:
>
>For example: I have 'test' procedure
>tst Except and tst Except2 are exception and they defined in the 'test'
>procedure
>This is code of the 'test' procedure:
>
>BEGIN
> RAISE tstExcept;
>EXCEPTION
> WHEN tst Except THEN
> NULL;
> WHEN tst Except2 THEN
> NULL;
> WHEN OTHERS THEN
> NULL;
> END;
>
>Designer generates it into:
>
>CREATE OR REPLACE PROCEDURE TST
> IS
>-- Program Data
>TSTEXCEPT2 EXCEPTION;
>TSTEXCEPT EXCEPTION;
>
>-- PL/SQL Block
>BEGIN
> RAISE tstExcept;
>EXCEPTION
> WHEN TSTEXCEPT2 THEN -- !!!!
> WHEN TSTEXCEPT THEN -- !!!!
>
> WHEN tst Except THEN
> NULL;
> WHEN tst Except2 THEN
> NULL;
> WHEN OTHERS THEN
> NULL;
> END;
>
>Is there a way to resolve it ?
>
>Michael.
>
>

When using exceptions declaratively, do not put them explicitly in your PL/SQL code. In the dialog box where you declare the exceptions, there is also an editor for each exception's code. Put your code there.

NOTE: There is a bug (surprise!) in the generator. It is sometimes confused about where to put the EXCEPTION keyword. The workaround is to explicitly wrap your code in BEGIN/END.

Regards,

Roy Brokvam
roy.brokvam_at_conax.com Received on Tue Apr 27 1999 - 09:35:06 CEST

Original text of this message