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 -> Re: How to capture Oracle Error

Re: How to capture Oracle Error

From: Erika Grondzakova <Erika.Grondzakova_at_cern.ch>
Date: Mon, 09 Jul 2001 17:39:47 +0200
Message-ID: <3B49D043.18FFBBD7@cern.ch>

Hello,

You can try this

CREATE OR REPLACE PROCEDURE SP_LOAD_REVEXP_TBL

(IN_Inv_Per  CHAR DEFAULT NULL,
 IN_Prj_Id   NUMBER DEFAULT NULL,
 IN_Cust_Id  CHAR DEFAULT NULL)

IS
begin

  if IN_Inv_Per is null and IN_Prj_Id is null and IN_Cust_id is null then

    raise_application_error(-20101, 'Here follows your error text...');   end if;

end;
/

Hth,

Erika

NeedaHoliday wrote:
>
> Could someone tell me how to capture the following;
>
> I have a procedure with the following parameters;
>
> CREATE OR REPLACE PROCEDURE SP_LOAD_REVEXP_TBL
> (IN_Inv_Per CHAR,
> IN_Prj_Id NUMBER,
> IN_Cust_Id CHAR)
> IS
>
> If I execute this without parameters I get
>
> ERROR at line 1:
> ORA-06550: line 1, column 7:
> PLS-00306: wrong number or types of arguments in call to
> 'SP_LOAD_REVEXP_TBL'
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
>
> What I want to do is, override the Oracle error and put my own.
>
> Is there a way ?
>
> THanks in advance
Received on Mon Jul 09 2001 - 10:39:47 CDT

Original text of this message

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