Error handling
Care is taken to return the appropriate exit codes to the command processor. This makes it possible and easier to do error handling in automation scripts. Error and messages are normally directed to standard out with more detailed error logging output is directed to standard error.
Csv |
---|
|
Error type, Exit code\\ Windows, Exit code\\ Other, Description
SUCCESS, 0, 0, Normal exit
CLIENT_EXCEPTION, -1, 255, "The client has found a problem with the request and is reporting an error with a message."
PARAMETER_PROBLEM, -2, 254, "The client processed the command parameters and found a syntax error or missing required parameters according to the [parameter definition|#helptext]"
REMOTE_EXCEPTION, -3, 253, "The remote system has reported an error. The error message comes from the server."
FAILURE, -99, 157, "The client program failed in an unexpected way.";
Table plus |
---|
Exit Code | Exit Code Windows | Exit Code Other | Description |
---|
SUCCESS | 0 | 0 | Normal exit | CLIENT_EXCEPTION | -1 | 255 | The client has found a problem with the request and is reporting an error with a message. | PARAMETER_PROBLEM or HELP | -2 | 254 | The client processed the command parameters and found a syntax error or missing required parameters according to the parameter definition. A help request also returns -2. | REMOTE_EXCEPTION | -3 | 253 | The remote system has reported an error. The error message comes from the server. | CLIENT_SPECIFIC_EXCEPTION | -4 | 252 | The client is indicating a specific failure in cases where it is important to distinguish from other errors. Examples: - System client
return action can indicated a user specified error condition and message. - Bamboo CLI - ResultException - a build was queued with wait and the result of the build was failed.
| SQL_EXCEPTION | -5 | 251 | The client had problems running a database SQL request. | FAILURE | -99 | 157 | The client program failed in an unexpected way. Likely needs a support ticket to be opened. |
|