Command Central 10.7 | Using the Command Line Interface | Options for the Commands | error
 
error
Specifies a file where you want a command to write the output if the command results in an error. If you do not specify the {--error | -r} option, the command writes the output to the console.
Syntax
{--error | -r} file
Arguments
Argument
Description
file
Specifies the file where you want the error output written. If the file you specify does not exist, the command creates it. You can specify:
*Absolute directory path and filename.
*Relative directory path and filename. The path is relative from where you initiated the command.
*Filename of a file in the same directory where you initiated the command.
Usage Notes
*If the file you specify with the {--error | -r} option already exists, the command overwrites the existing file with the new service results.
*If a command encounters an error, to help resolve errors, you can execute the command again using the {--debug | -d} option to display additional information about the actual request and response.
*You can use the {--error | r} option to direct error results to a specific location, for example, if you want to use automated tools to review output.
*If a command executes successfully, the command writes the output to the location specified by the {--output | -o} option or the console if the {--output | -o} option is not specified.
Examples
*To write error output to a file named “errors.xml” in the directory c:\outputs:
--error c:\outputs\errors.xml
*To write error output to a file named “errors.json” in the \outputs directory relative to where you initiate the command:
--error outputs\errors.json
*To write output to a file named “errors” in the same directory from where you initiate the command:
--error errors
In this example, the command determines the file extension based on the request content type.