EasyManua.ls Logo

Quantum Data 881 - Page 566

Quantum Data 881
1144 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
188 Chapter 15 Script SDK
else
printf("\nCommand execution failed.\n");
// =========================================================
// Demonstration of detecting invalid command
// =========================================================
// First, set CancelOnError to be FALSE, the test should continue to
next
sc.SetCancelOnError( false );
sc.SetCmdName("VERP?");
sc.Exec();
printf("\nThe error status of the invalid command %s is %d\n",
sc.GetCmdName(), sc.GetError());
if (sc.Canceled()) {
printf("The test exited because the command is not valid\n");
return true;
}
else
{
printf("Script not cancelled. Execution should continue\n");
}
// Then, set CancelOnError to be TRUE, the test should continue to
next
sc.SetCancelOnError( true );
sc.SetCmdName("VERP?");
sc.Exec();
printf("\nThe error status of the invalid command %s is %d\n",
sc.GetCmdName(), sc.GetError());
if (sc.Canceled()) {
printf("The test exited because the command is not valid\n");
return true;
}
else
{
printf("Script not cancelled. Execution should continue\n");
}
return true;
}

Table of Contents

Related product manuals