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: ORA-06503 Function returned without Value

Re: ORA-06503 Function returned without Value

From: Jurij Modic <jmodic_at_src.si>
Date: Sat, 20 Mar 1999 23:30:27 GMT
Message-ID: <36f42f8b.2828258@news.arnes.si>


On Sat, 20 Mar 1999 14:19:53 -0700, "Gerry West" <gwest_at_skyconnect.com> wrote:

>CREATE OR REPLACE FUNCTION openConfigLogfile( i_log_handle IN OUT
>UTL_FILE.FILE_TYPE )
>RETURN UTL_FILE.FILE_TYPE IS
>BEGIN
> /* Make sure the file is closed first. */
> IF UTL_FILE.IS_OPEN(i_log_handle) THEN
> UTL_FILE.FCLOSE(i_log_handle);
> END IF;
>
> /* Open the file for writing. */
> i_log_handle := UTL_FILE.FOPEN('/usr/oracle8/install',
>'nvod_config.log', 'a');
>
>EXCEPTION
> WHEN UTL_FILE.INVALID_PATH THEN
> RAISE_APPLICATION_ERROR(-20100, 'Reset: Invalid Path');
> WHEN UTL_FILE.INVALID_MODE THEN
> RAISE_APPLICATION_ERROR(-20101, 'Reset: Invalid Mode');
> WHEN UTL_FILE.INVALID_OPERATION THEN
> RAISE_APPLICATION_ERROR(-20101, 'Reset: Invalid Operation');
>
>RETURN i_log_handle;
>END openConfigLogfile;
>/

Your RETURN command applies only to the INVALID_OPERATION exception, not to the function's body. You should put the RETURN before the EXCEPTION. HTH,
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)



The above opinions are mine and do not represent any official standpoints of my employer Received on Sat Mar 20 1999 - 17:30:27 CST

Original text of this message

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