onerror

This command specifies a label where control should be transferred in the case of an error.

onerror [label]

Parameters

  • label
    Specifies the label to branch to if a script command returns an error. Labels are specified as in MS-DOS batch files by starting a line with a colon followed by the label's name.

Remarks

This command lets you define a label where control is transferred if any script command generates an error. You can specify different labels for different areas of a script. An error label remains current until another onerror command is executed.

See Also

Scripting Support Commands

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.