![]() |
The plugin returns a value of the ReturnCode enumerated type in the output parameter of certain methods to indicate whether the action (request) was successful (completed).
When VWorks software receives a return code of RETURN_BAD_ARGS, it calls the IWorksDriver GetErrorInfo method to get more information about the error. See “GetErrorInfo method” . When VWorks software receives a fail error code from the plugin, it assumes that the error is recoverable and enters the VWorks software error loop, which is described below.
1
2 VWorks software does the following:
a Calls the IWorksDriver GetErrorInfo method to get a literal string that describes the error from the plugin. See IWorksDriver “GetErrorInfo method” .
c Displays the standard error dialog box, which includes the following components:
• The Abort, Ignore and Continue…, Retry, and Diagnostics buttonsThe figure on page 41 shows a standard error dialog box.
3 The user clicks the Abort, Ignore and Continue…, Retry, or Diagnostics button.
4 VWorks software calls the appropriate IWorksDriver method, Abort, Ignore, or Retry, or the IWorksDiags ShowDiagsDialog method. See “Abort method” ,“Ignore method” , and “Retry method” , and “ShowDiagsDialog method” .The VWorks software error loop can only be terminated with a call to the IWorksDriver Abort method or when VWorks software receives a return code other than RETURN_FAIL.For both synchronous and asynchronous tasks, VWorks software tells the plugin to execute a task by calling the IWorksDriver Command method.For synchronous tasks, the plugin finishes executing the task before the Command method returns, so the plugin can tell VWorks software whether the task executed successfully. See “Command method” .For asynchronous tasks, the Command method returns immediately after starting the task, before it knows whether the task completed successfully. Consequently, the plugin always returns RETURN_SUCCESS for asynchronous tasks, or RETURN_BAD_ARGS if one or more of the command arguments are incorrect. If the asynchronous task ultimately fails, the plugin notifies VWorks software about the failure by calling the IWorksController ErrorAbortRetryIgnoreNonBlocking update, which triggers the error-handling process described in “ErrorAbortRetryIgnoreNonBlocking update” .