WHENEVER OSERROR
WHENEVER OSERROR
{EXIT [SUCCESS|FAILURE|n|variable|:BindVariable] [COMMIT|ROLLBACK]
|CONTINUE [COMMIT|ROLLBACK|NONE]}
Performs the specified action (exits SQL*Plus by default) if an operating system error occurs (such as a file writing error).
In iSQL*Plus, performs the specified action (stops the current script by default) and returns focus to the Input area if an operating system error occurs.
WHENEVER SQLERROR
WHENEVER SQLERROR
{EXIT [SUCCESS|FAILURE|WARNING|n|variable|:BindVariable]
[COMMIT|ROLLBACK]|CONTINUE [COMMIT|ROLLBACK|NONE]}
Performs the specified action (exits SQL*Plus by default) if a SQL command or PL/SQL block generates an error.
In iSQL*Plus, performs the specified action (stops the current script by default) and returns focus to the Input area if a SQL command or PL/SQL block generates an error
Usage
The WHENEVER SQLERROR command is triggered by SQL command or PL/SQL block errors, and not by SQL*Plus command errors.
http://download.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1014649