228229230231232233234235236237238
if (cause instanceof AmazonClientException) { throw ( AmazonClientException ) cause; } AmazonClientException ce = new AmazonClientException("Caught an exception while waiting for request to complete..."); ce.initCause(ee); throw ce; } return toReturn;
305306307308309310311312313314315
} } catch (InterruptedException e) { Thread.currentThread().interrupt(); AmazonClientException toThrow = new AmazonClientException("Interrupted while waiting for lock."); toThrow.initCause(e); throw toThrow; } return theFuture; }