Previous Topic: RemoteTarget.hasCompleted MethodNext Topic: RemoteTarget.output Method


RemoteTarget.onError Method

Event handlers are optional functions that can be implemented in user scripts and called by AutoShell when certain events occur. If present, the event handler is called when an error occurs during remote execution.

This method has the following syntax:

onError(e)

Note: The AutoShell ignores event handler return values.

Example

Specify error handler for a RemoteTarget:

rt = new RemoteTarget("ascli1");
// Assign event handler
rt.onError = function(e){qout("Error occured, code=", e);};
run-remote "2*2" on rt

See also:

RemoteTarget.errorOccurred Method

RemoteTarget.getError Method