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