This method returns detailed error information after a remote execution attempt fails.
This method has the following syntax:
getError()
The method returns one of the following error codes:
Indicates success.
Indicates a connection error, for example, host unknown.
Indicates an authentication error.
Indicates an error when establishing a channel.
Indicates an error when reading from a remote system.
Indicates an error when evaluating expressions.
Indicates when a user aborts an operation.
Indicates an error when disconnecting from a remote system.
Example
Display detailed error information:
rt = new RemoteTarget("ascli1");
run-remote Math.sqrt(1) on rt -wait
switch(rt.getError())
{
case RemoteTarget.REM_ERR_NONE:
? "Success"
break;
case RemoteTarget.REM_ERR_CON:
? "Error connecting"
break;
case RemoteTarget.REM_ERR_AUTH:
? "Error authenticating"
break;
case RemoteTarget.REM_ERR_CHN:
? "Error establishing channel"
break;
case RemoteTarget.REM_ERR_READ:
? "Error reading from remote system"
break;
case RemoteTarget.REM_ERR_EXEC:
? "Error evaluating expression"
break;
case RemoteTarget.REM_ERR_ABORT:
? "Operation aborted by user"
break;
case RemoteTarget.REM_ERR_DISC:
? "Error disconnecting from remote system"
break;
default:
? "Unknown error"
}
|
Copyright © 2013 CA.
All rights reserved.
|
|