cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [47/50] git commit: updated refs/heads/master to 0b83559
Date Wed, 29 Apr 2015 05:44:31 GMT
volume-upload: refactored some error messages


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0525e476
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0525e476
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0525e476

Branch: refs/heads/master
Commit: 0525e4763b7fa991535cea662ed53a41493c427c
Parents: bc399b9
Author: Rajani Karuturi <rajanikaruturi@gmail.com>
Authored: Tue Apr 7 16:26:38 2015 +0530
Committer: Rajani Karuturi <rajanikaruturi@gmail.com>
Committed: Fri Apr 24 15:45:29 2015 +0530

----------------------------------------------------------------------
 .../storage/resource/NfsSecondaryStorageResource.java     | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0525e476/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index 7cfaa9c..1cd69fc 100755
--- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -2613,8 +2613,9 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
         TemplateOrVolumePostUploadCommand cmd = getTemplateOrVolumePostUploadCmd(metadata);
         UploadEntity uploadEntity = null;
         if(cmd == null ){
-            updateStateMapWithError(uuid,"unable decode and deserialize metadata.");
-            throw new InvalidParameterValueException("unable to decode and deserialize metadata");
+            String errorMessage = "unable decode and deserialize metadata.";
+            updateStateMapWithError(uuid, errorMessage);
+            throw new InvalidParameterValueException(errorMessage);
         } else {
             uuid = cmd.getEntityUUID();
             if (isOneTimePostUrlUsed(cmd)) {
@@ -2628,8 +2629,9 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
             int maxSizeInGB = Integer.valueOf(cmd.getMaxUploadSize());
             int contentLengthInGB = getSizeInGB(contentLength);
             if (contentLengthInGB > maxSizeInGB) {
-                throw new InvalidParameterValueException("Maximum file upload size exceeded.
Content Length received: " + contentLengthInGB + "GB. Maximum allowed size: " +
-                                                             maxSizeInGB + "GB.");
+                String errorMessage = "Maximum file upload size exceeded. Content Length
received: " + contentLengthInGB + "GB. Maximum allowed size: " + maxSizeInGB + "GB.";
+                updateStateMapWithError(uuid, errorMessage);
+                throw new InvalidParameterValueException(errorMessage);
             }
             try {
                 String absolutePath = cmd.getAbsolutePath();


Mime
View raw message