ORA-06510: PL/SQL: unhandled user-defined exception
Bonjour,
mon script est :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
SET SERVEROUT ON
DECLARE
vInHandle utl_file.file_type;
vNewLine VARCHAR2(250);
vMessage VARCHAR2(250);
I pls_integer := 0;
LC$Fic_in Varchar2(128) := 'monALRT.LOG'; -- a adapter sur votre configuration
LC$Dir_in Varchar(30) := 'U:\ORADATA\MABASE\bdump';
BEGIN
vInHandle := utl_file.fopen(LC$Dir_in, LC$Fic_in, 'R');
LOOP
BEGIN
utl_file.get_line(vInHandle, vNewLine);
IF vNewLine like ('%ORA-%') then
vMessage:=vMessage||chr(10)||vNewLine;
END IF;
EXCEPTION
WHEN OTHERS THEN
EXIT;
END;
END LOOP;
DBMS_OUTPUT.ENABLE(10000);
DBMS_OUTPUT.PUT_LINE(vMessage);
utl_file.fclose(vInHandle);
END fopen;
/ |
et l'erreur est :
Code:
1 2 3 4 5 6 7 8
|
DECLARE
*
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 98
ORA-06512: at "SYS.UTL_FILE", line 157
ORA-06512: at line 11 |
or la ligne 98 dans utlfile.sql est :
Code:
1 2 3 4 5 6 7
|
97 ** IN
98 ** file - File handle (open)
99 ** EXCEPTIONS
100 ** invalid_filehandle - not a valid file handle
101 ** write_error - OS error occured during write operation
102 */ |
et la ligne 157 :
Code:
1 2 3 4 5 6 7 8 9 10 11
|
154 ** NEW_LINE - Write line terminators to file
155 **
156 ** IN
157 ** file - File handle (open in write/append mode)
158 ** lines - Number of newlines to write (default 1)
159 ** EXCEPTIONS
160 ** invalid_filehandle - not a valid file handle
161 ** invalid_operation - file is not open for writing/appending
162 ** write_error - OS error occured during write operation
163 */ |
Mais je ne veux que lire le fichier; alors pourquoi cette erreur ? Pouvez-vous m'aider ?
D'avance merci.