public static enum CosServiceException.ErrorType extends Enum<CosServiceException.ErrorType>
For example, if a client is using an invalid COS access key, the returned exception will indicate that there is an error in the request the caller is sending. Retrying that same request will *not* result in a successful response. The Client ErrorType indicates that there is a problem in the request the user is sending (ex: incorrect access keys, invalid parameter value, missing parameter, etc.), and that the caller must take some action to correct the request before it should be resent. Client errors are typically associated an HTTP error code in the 4xx range.
The Service ErrorType indicates that although the request the caller sent was valid, the service was unable to fulfill the request because of problems on the service's side. These types of errors can be retried by the caller since the caller's request was valid and the problem occurred while processing the request on the service side. Service errors will be accompanied by an HTTP error code in the 5xx range.
Finally, if there isn't enough information to determine who's fault the error response is, an Unknown ErrorType will be set.
| 限定符和类型 | 方法和说明 |
|---|---|
static CosServiceException.ErrorType |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static CosServiceException.ErrorType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final CosServiceException.ErrorType Client
public static final CosServiceException.ErrorType Service
public static final CosServiceException.ErrorType Unknown
public static CosServiceException.ErrorType[] values()
for (CosServiceException.ErrorType c : CosServiceException.ErrorType.values()) System.out.println(c);
public static CosServiceException.ErrorType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值Copyright © 2020. All rights reserved.