com.amazonaws.AmazonServiceException.getRawResponseContent()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中com.amazonaws.AmazonServiceException.getRawResponseContent()方法的一些代码示例,展示了AmazonServiceException.getRawResponseContent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AmazonServiceException.getRawResponseContent()方法的具体详情如下:
包路径:com.amazonaws.AmazonServiceException
类名称:AmazonServiceException
方法名:getRawResponseContent

AmazonServiceException.getRawResponseContent介绍

[英]Typically only useful for debugging purpose if for some reason the SDK cannot parse the HTTP response from a service
[中]通常,只有在SDK由于某种原因无法解析来自服务的HTTP响应时,才可用于调试目的

代码示例

代码示例来源:origin: com.ibm.stocator/stocator

public String getRawResponseContent() {
 return getCause().getRawResponseContent();
}

代码示例来源:origin: CODAIT/stocator

public String getRawResponseContent() {
 return getCause().getRawResponseContent();
}

代码示例来源:origin: org.apache.hadoop/hadoop-aws

public String getRawResponseContent() {
 return getCause().getRawResponseContent();
}

代码示例来源:origin: org.apache.hadoop/hadoop-aws

/**
 * Get low level details of an amazon exception for logging; multi-line.
 * @param e exception
 * @return string details
 */
public static String stringify(AmazonServiceException e) {
 StringBuilder builder = new StringBuilder(
   String.format("%s: %s error %d: %s; %s%s%n",
     e.getErrorType(),
     e.getServiceName(),
     e.getStatusCode(),
     e.getErrorCode(),
     e.getErrorMessage(),
     (e.isRetryable() ? " (retryable)": "")
   ));
 String rawResponseContent = e.getRawResponseContent();
 if (rawResponseContent != null) {
  builder.append(rawResponseContent);
 }
 return builder.toString();
}

相关文章