diff --git a/.gitignore b/.gitignore index a05b0a82..ac12dcba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /target/ /.settings/ .classpath -.project \ No newline at end of file +.project +.idea +*.iml \ No newline at end of file diff --git a/src/main/java/com/aliyun/oss/internal/OSSOperation.java b/src/main/java/com/aliyun/oss/internal/OSSOperation.java index 4e060306..76989ab5 100644 --- a/src/main/java/com/aliyun/oss/internal/OSSOperation.java +++ b/src/main/java/com/aliyun/oss/internal/OSSOperation.java @@ -57,6 +57,14 @@ public abstract class OSSOperation { protected static RequestIdResponseParser requestIdResponseParser = new RequestIdResponseParser(); protected static RetryStrategy noRetryStrategy = new NoRetryStrategy(); + /** + * use for self define error handle, default OSSErrorResponseHandler response data is too sample + * @param handler + */ + public static void setDefaultOSSErrorResponseHandler(OSSErrorResponseHandler handler){ + errorResponseHandler = handler; + } + protected OSSOperation(ServiceClient client, CredentialsProvider credsProvider) { this.client = client; this.credsProvider = credsProvider;