|
|
|
@@ -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; |
|
|
|
} |
|
|
|
|