rhtyd commented on a change in pull request #2721: api: Introducing a new 
diagnostics API command for system VMs for CloudStack admins
URL: https://github.com/apache/cloudstack/pull/2721#discussion_r201298172
 
 

 ##########
 File path: 
core/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsAnswer.java
 ##########
 @@ -41,12 +41,14 @@ public DiagnosticsAnswer(DiagnosticsCommand cmd, boolean 
result, String details)
                 executionDetailsMap.put(ApiConstants.STDOUT, 
parseDetails[0].trim());
                 executionDetailsMap.put(ApiConstants.STDERR, 
parseDetails[1].trim());
                 executionDetailsMap.put(ApiConstants.EXITCODE, 
String.valueOf(parseDetails[2]).trim());
-                return executionDetailsMap;
             } else {
                 throw new CloudRuntimeException("Unsupported diagnostics 
command type supplied");
             }
         } else {
-            throw new CloudRuntimeException("Command execution failed: " + 
details);
+            executionDetailsMap.put(ApiConstants.STDOUT, "");
+            executionDetailsMap.put(ApiConstants.STDERR, details );
 
 Review comment:
   Remove space after `details`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to