SQL>
SQL>
SQL> DECLARE
2 bad_date EXCEPTION;
3 PRAGMA EXCEPTION_INIT (bad_date, -01843);
4 BEGIN
5 DBMS_OUTPUT.PUT_LINE (TO_DATE ('13/13/99', 'MM/DD/YY'));
6 EXCEPTION
7 WHEN bad_date
8 THEN
9 DBMS_OUTPUT.PUT_LINE('Just twelve months in a year...');
10 END;
11 /
Just twelve months in a year...
PL/SQL procedure successfully completed.
SQL>
|