本文整理了Java中com.amazonaws.AmazonServiceException.toString()
方法的一些代码示例,展示了AmazonServiceException.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AmazonServiceException.toString()
方法的具体详情如下:
包路径:com.amazonaws.AmazonServiceException
类名称:AmazonServiceException
方法名:toString
暂无
代码示例来源:origin: aws/aws-sdk-java
/**
* Extends the implementation from AmazonServiceException to include
* additional information on S3's extended request ID.
*/
@Override
public String toString() {
return super.toString() + ", "
+ "S3 Extended Request ID: " + getExtendedRequestId();
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Extends the implementation from AmazonServiceException to include
* additional information on S3's extended request ID.
*/
@Override
public String toString() {
return super.toString() + ", "
+ "S3 Extended Request ID: " + getExtendedRequestId();
}
代码示例来源:origin: com.amazonaws/aws-android-sdk-s3
/**
* Extends the implementation from AmazonServiceException to include
* additional information on S3's extended request ID.
*/
@Override
public String toString() {
return super.toString() + ", "
+ "S3 Extended Request ID: " + getExtendedRequestId();
}
代码示例来源:origin: Nextdoor/bender
/**
* Extends the implementation from AmazonServiceException to include
* additional information on S3's extended request ID.
*/
@Override
public String toString() {
return super.toString() + ", "
+ "S3 Extended Request ID: " + getExtendedRequestId();
}
代码示例来源:origin: aws-amplify/aws-sdk-android
try {
exception = errorResponseHandler.handle(response);
REQUEST_LOG.debug("Received error response: " + exception.toString());
} catch (final Exception e) {
代码示例来源:origin: ch.cern.hadoop/hadoop-aws
private void printAmazonServiceException(AmazonServiceException ase) {
LOG.info("Caught an AmazonServiceException {}", ase.toString());
LOG.info("Error Message: {}", ase.getMessage());
LOG.info("HTTP Status Code: {}", ase.getStatusCode());
LOG.info("AWS Error Code: {}", ase.getErrorCode());
LOG.info("Error Type: {}", ase.getErrorType());
LOG.info("Request ID: {}", ase.getRequestId());
LOG.info("Stack", ase);
}
}
代码示例来源:origin: com.erudika/para
private void logException(AmazonServiceException ase) {
logger.error("AmazonServiceException: error={}, statuscode={}, "
+ "awserrcode={}, errtype={}, reqid={}", ase.toString(), ase.getStatusCode(),
ase.getErrorCode(), ase.getErrorType(), ase.getRequestId());
}
}
代码示例来源:origin: com.erudika/para-server
private static void logException(AmazonServiceException ase) {
logger.error("AmazonServiceException: error={}, statuscode={}, awserrcode={}, errtype={}, reqid={}",
ase.toString(), ase.getStatusCode(), ase.getErrorCode(), ase.getErrorType(), ase.getRequestId());
}
代码示例来源:origin: Erudika/para
private static void logException(AmazonServiceException ase) {
logger.error("AmazonServiceException: error={}, statuscode={}, awserrcode={}, errtype={}, reqid={}",
ase.toString(), ase.getStatusCode(), ase.getErrorCode(), ase.getErrorType(), ase.getRequestId());
}
代码示例来源:origin: zalando-stups/fullstop
@Override
public void onException(Exception e, Map<String, String> context) {
if (e instanceof AmazonServiceException) {
final AmazonServiceException a = (AmazonServiceException) e;
if (a.getErrorCode().equals("RequestLimitExceeded")) {
logWarn("RequestLimitExceeded", context);
} else if (a instanceof AWSSecurityTokenServiceException) {
logWarn(a.toString(), context);
} else {
logError(a, context);
}
} else {
logError(e, context);
}
}
代码示例来源:origin: msoute/vertx-deploy-tools
public boolean checkEc2Instance(String instanceId) {
boolean instanceTerminated = false;
try {
DescribeInstancesResult result = awsEc2Client.describeInstances(new DescribeInstancesRequest().withInstanceIds(instanceId));
List<com.amazonaws.services.ec2.model.Instance> instances = result.getReservations().stream()
.flatMap(r -> r.getInstances().stream())
.filter(i -> i.getInstanceId().equals(instanceId))
.collect(Collectors.toList());
instanceTerminated = instances.isEmpty() || instances.stream()
.map(com.amazonaws.services.ec2.model.Instance::getState)
.anyMatch(s -> s.getCode().equals(48));
} catch (AmazonServiceException e) {
log.info(e.toString(), e);
if (e.getStatusCode() == 400) {
instanceTerminated = true;
}
}
if (instanceTerminated) {
log.warn("Invalid instance " + instanceId + " in group " + activeConfiguration.getAutoScalingGroupId() + ". Detaching instance.");
awsAsClient.detachInstances(new DetachInstancesRequest()
.withAutoScalingGroupName(activeConfiguration.getAutoScalingGroupId())
.withInstanceIds(instanceId)
.withShouldDecrementDesiredCapacity(false));
}
return instanceTerminated;
}
代码示例来源:origin: com.gluonhq/aws-java-sdk-core
try {
exception = errorResponseHandler.handle(response);
REQUEST_LOG.debug("Received error response: " + exception.toString());
} catch (final Exception e) {
代码示例来源:origin: com.amazonaws/aws-android-sdk-core
try {
exception = errorResponseHandler.handle(response);
REQUEST_LOG.debug("Received error response: " + exception.toString());
} catch (final Exception e) {
内容来源于网络,如有侵权,请联系作者删除!