CSRCurrent en:Exit Codes
Every application returns an exit code when it stops running. In general, when an application has finished without an error it should return the code '0'. If an error has occurred the exit code should be a different one. This way, a developer can easily determine the cause for the error and show a user friendly Error Dialogue. In case of an exit code 0, a transfer was created in any case and can be retrieved. However, errors may have occurred. For example, files may have been removed by pre-processing or other problems may have occurred. If these cases should be handled differently than a completely successful transfer, the "strict"-mode can be activated. This has the consequence that partially complete transfers lead to a separate error code.
How to use Exit Codes within scripts
On Windows systems the exit code is written to the environment variable 'errorlevel'. Check this variable after the execution of the Robot to see if it finished with an error or not.
Example: Printing the Exit Code on Windows echo %errorlevel%
On Linux systems the exit code is written to the environment variable '$?'. Check this variable after the Robot completes, to see if it finished with an error or not.
Example: Printing the Exit Code on Linux echo $?
List of available Exit Codes
Exit Codes for the Cryptshare Robot can be classified in 3 categories:
- Exit codes for errors that occurred on the server side
- Exit codes for errors that occurred on the client side (Robot)
- Exit codes for errors caused due to wrong use of the command line arguments
The following table lists all exit codes which can occur when the Cryptshare Robot runs into an error.
|The Cryptshare Server licence does not grant the use of the Cryptshare Robot.
|Wrong use of the Cryptshare service. The request cannot be handled.
|The submitted request is missing a configuration parameter.
|The given data is not valid.
|This client or sender is not verified, and the requested operation is only allowed for verified clients and senders.
|Error initializing the client due to an invalid WSDL file that could not be parsed. This error can occur when the client is trying to access the Cryptshare Server using the HTTP protocol, but the server has "Force secure connection" enabled and therefore requires HTTPS access to get the valid WSDL file.
|Error initializing the client.
|Error generating a Client ID.
|Error initializing the web service.
|Error performing the requested web service operation.
|Error when generating a password.
|The Robot verification store has an error.
|Illegal argument error.
|The client is not authorized to use the requested service.
|The Crypshare Server encountered an unspecified error. Check the server logs.
|The Cryptshare Server encountered an error while trying to send or load the requested email.
|The specified session could not be found. The request is invalid.
|A file processing error occured.
|The Robot detected a wrong or missing configuration parameter.
|An error occurred while trying to parse the command line arguments.
|Error connecting to the Cryptshare Server.
|An error occurred while trying to encrypt/decrypt a password.
|Wrong URL syntax.
|A command line option was missing.
|The password requirements are not fulfilled.
|The specified file could not be found or read.
|No valid files are specified for the transfer.
|Incompatibe Java Runtime Version.
|An error occurred while trying to query something from the server.
|An error occurred during the transfer of the files.
|An partial error occurred during the transfer of the files. This code will only be returned if "strict"-mode is enabled.
|The cause for this error could not be determined. The Cryptshare Robot logs should be checked.
|The cause for this error could not be determined. The Cryptshare Server logs should be checked.