Kaynağa Gözat

[aws文件上传失败exception][新增]

release_toaliyun_real
Stormeye.Wu 7 yıl önce
ebeveyn
işleme
1b43e9a079
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. +6
    -0
      mallinkAdmin/src/main/java/com/simple/controller/UploadController.java

+ 6
- 0
mallinkAdmin/src/main/java/com/simple/controller/UploadController.java Dosyayı Görüntüle

@@ -167,6 +167,8 @@ public class UploadController extends BaseController {
"to Amazon S3, but was rejected with an error response" +
" for some reason.");
logger.warn(ase.getMessage());
data.code = ResultData.ERROR;
data.message = "上传失败";
} catch (AmazonClientException ace) {
data.code = ResultData.ERROR;
logger.warn("Caught an AmazonClientException, which " +
@@ -175,9 +177,13 @@ public class UploadController extends BaseController {
"communicate with S3, " +
"such as not being able to access the network.");
logger.warn("Error Message: " + ace.getMessage());
data.code = ResultData.ERROR;
data.message = "上传失败";
} catch (IOException ioe) {
data.code = ResultData.ERROR;
logger.warn("Caught an IOException: " + ioe.getMessage());
data.code = ResultData.ERROR;
data.message = "上传失败";
}
return data;
}


Yükleniyor…
İptal
Kaydet