Error Handling and Abort Mode

Previous Next

See Also

USoft Batch distinguishes between fatal errors (for example, a syntax error in a SQL statement) and non-fatal errors (for example, a constraint violation). If a fatal error occurs, the job is always aborted. What happens when a non-fatal error occurs depends on the setting of the Abort Mode attribute of a task, as follows:

· None: The error is reported, and the task and subsequent tasks continue.

 

· Abort Task on Error: The error is reported, the current task is aborted, and subsequent tasks are executed.

 

· Abort Job on Error: The error is reported, and the current task and all subsequent tasks are aborted. The job returns to its caller that it has failed.

If the job is called by a job task, the job containing this job task is not automatically aborted. Its behavior depends on the Abort Mode setting of the job task.

When using Batch Runner, the log file will either end with 'Batch finished normally', or 'Batch stopped with errors'. This last message only occurs when a fatal error occurred, or when a non-fatal error occurred in a task with the Abort Mode attribute set to: Abort Job on Error.

When this job was started using:

INVOKE BatchRunner.[<job name>|RunJob],

normal error handling occurs in case of the message 'Batch stopped with errors'.