Example usage for com.amazonaws.services.ec2.model BundleTaskError getMessage

List of usage examples for com.amazonaws.services.ec2.model BundleTaskError getMessage

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2.model BundleTaskError getMessage.

Prototype


public String getMessage() 

Source Link

Document

The error message.

Usage

From source file:com.zotoh.cloudapi.aws.AMImage.java

License:Open Source License

private long onBundleFailure(long lastFailed, BundleTask t, AsynchronousTask<String> task) {
    BundleTaskError e = t.getBundleTaskError();
    String msg = e == null ? null : e.getMessage();

    if (isEmpty(msg)) {
        if (lastFailed == -1L) {
            lastFailed = System.currentTimeMillis();
        }//from w  w  w. ja va2s.co  m
        if ((System.currentTimeMillis() - lastFailed) > (CalendarWrapper.MINUTE * 2)) {
            msg = "Bundle failed without further information.";
        }
    }
    if (!isEmpty(msg)) {
        task.complete(new CloudException(msg));
    }

    return lastFailed;
}