Using the on error Command

Related Topics

Use this command and its parameters to dictate the script behavior when execution fails. The default behavior is for the script to continue executing subsequent commands after a command has failed. The other parameter you can use is stop, so the script engine stops after a failed command.

Important: This command is for execution errors, not syntax errors. Also, there may be certain error conditions that override the on error continue parameter.

This reference contains commands and parameters that are current with the latest storage management software. If you are managing storage subsystems running firmware for previous releases, not all of these commands may be supported. See the for a complete list of commands and their associated firmware levels.

If you want to...

Use this command and parameters

stop execution of the script (do not execute subsequent commands) if any commands following the on error stop command fail

Back to the top

Base Command and Required Parameters

on error stop;

Example

Command statement:

on error stop;

recreateFlashCopy logicalDrive ["Chevelle-S1"];

download storageSubsystem firmwareFile="04000001.dlp";

Execution result:

If the recreateFlashCopy command fails, the script engine does not attempt to execute the download storageSubsystem firmwareFile command that follows.

continue execution of subsequent commands if any commands following the on error continue command fail

Note: This is the default script engine behavior.

Back to the top

Base Command and Required Parameters

on error continue;

Example

Command statement:

on error continue;

recreateFlashCopy logicalDrive ["Chevelle-S1"];

download storageSubsystem firmwareFile="04000001.dlp";

Execution result:

If the recreateFlashCopy command fails, the script engine attempts to execute the download storageSubsystem firmwareFile command that follows.

Related Topics

Learn About the Script Editor

Using the Script Editor

Command Reference

Firmware Compatibility List