Example usage for com.amazonaws.services.codedeploy.model ErrorInformation getCode

List of usage examples for com.amazonaws.services.codedeploy.model ErrorInformation getCode

Introduction

In this page you can find the example usage for com.amazonaws.services.codedeploy.model ErrorInformation getCode.

Prototype


public String getCode() 

Source Link

Document

<p> For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/error-codes.html">Error Codes for AWS CodeDeploy</a> in the <a href="https://docs.aws.amazon.com/codedeploy/latest/userguide">AWS CodeDeploy User Guide</a>.

Usage

From source file:jetbrains.buildServer.runner.codedeploy.AWSClient.java

License:Apache License

@Contract("null -> null")
@Nullable/*from   w ww.  j  a  v a2s.c o  m*/
private Listener.ErrorInfo getErrorInfo(@Nullable DeploymentInfo dInfo) {
    if (dInfo == null)
        return null;

    final ErrorInformation errorInformation = dInfo.getErrorInformation();
    if (errorInformation == null)
        return null;

    final Listener.ErrorInfo errorInfo = new Listener.ErrorInfo();
    errorInfo.message = removeTrailingDot(errorInformation.getMessage());
    errorInfo.code = errorInformation.getCode();
    return errorInfo;
}