CSRCurrent en:Exit Codes

Aus Cryptshare Documentation
Version vom 8. Juni 2022, 15:37 Uhr von imported>Frorathm
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu:Navigation, Suche


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

Windows

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%

Linux

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:

  1. Exit codes for errors that occurred on the server side
  2. Exit codes for errors that occurred on the client side (Robot)
  3. 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.

Category Exit Code Abbreviation Description
1 10 NOT_LICENSED The Cryptshare Server licence does not grant the use of the Cryptshare Robot.
1 30 WRONG_USE Wrong use of the Cryptshare service. The request cannot be handled.
1 40 MISSING_PARAMETER The submitted request is missing a configuration parameter.
1 41 INVALID_DATA The given data is not valid.
1 60 NOT_VERIFIED This client or sender is not verified, and the requested operation is only allowed for verified clients and senders.
2 105 INIT_WSDL 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.
2 110 INIT_ERROR Error initializing the client.
2 115 CLIENT_ID_ERROR Error generating a Client ID.
2 120 INIT_WEBSERVICE_OPERATION_ERROR Error initializing the web service.
2 130 PERFORM_WEBSERVICE_OPERATION_ERROR Error performing the requested web service operation.
2 140 PASSWORD_ERROR Error when generating a password.
2 170 INVALID_STORE The Robot verification store has an error.
3 190 ILLEGAL_ARGUMENT_ERROR Illegal argument error.
1 220 NOT_AUTHORIZED The client is not authorized to use the requested service.
1 230 SERVER_ERROR The Crypshare Server encountered an unspecified error. Check the server logs.
1 240 MAIL_ERROR The Cryptshare Server encountered an error while trying to send or load the requested email.
1 250 NO_SESSION The specified session could not be found. The request is invalid.
1 260 PROCESSING_ERROR A file processing error occured.
2 310 PROPERTY_FAILURE The Robot detected a wrong or missing configuration parameter.
3 320 COMMANDLINE_PARSE An error occurred while trying to parse the command line arguments.
2 330 CONNECTION_FAIL Error connecting to the Cryptshare Server.
2 340 CRYPT_FAIL An error occurred while trying to encrypt/decrypt a password.
3

350 URL_SYNTAX Wrong URL syntax.
3

360 MISSING_OPTION A command line option was missing.
2 370 PASSWORD The password requirements are not fulfilled.
2 380 INVALID_FILE The specified file could not be found or read.
2 400 NOFILES No valid files are specified for the transfer.
2 410 INVALID_JAVA_VERSION Incompatibe Java Runtime Version.
2 420 SERVER_QUERY_FAIL An error occurred while trying to query something from the server.
2 430 TRANSFER_FAIL An error occurred during the transfer of the files.
2 440 PARTIAL_TRANSFER_FAIL An partial error occurred during the transfer of the files. This code will only be returned if "strict"-mode is enabled.
2

-1

UNDEFINED The cause for this error could not be determined. The Cryptshare Robot logs should be checked.
1 5000 UNKNOWN_ERROR The cause for this error could not be determined. The Cryptshare Server logs should be checked.