ham1 commented on a change in pull request #603:
URL: https://github.com/apache/jmeter/pull/603#discussion_r448876800



##########
File path: 
src/core/src/main/java/org/apache/jmeter/reporters/ResultCollector.java
##########
@@ -338,6 +353,22 @@ public void testStarted(String host) {
         if(summariser != null) {
             summariser.testStarted(host);
         }
+        errorOnlyCached = isErrorLogging();
+        successOnlyCached = isSuccessOnlyLogging();
+        fileNameCached = getFilename();
+    }
+
+    private void saveSampleEvent(SampleEvent event, SampleSaveConfiguration 
saveConfig) {
+        try {
+            event.getResult().setSaveConfig(saveConfig);
+            if (saveConfig.saveAsXml()) {
+                SaveService.saveSampleResult(event, out);
+            } else { // !saveAsXml
+                CSVSaveService.saveSampleResult(event, out);
+            }
+        } catch (Exception err) {
+            log.error("Error trying to record a sample", err); // should throw 
exception back to caller

Review comment:
       "should throw exception back to caller" this is confusing, it doesn't 
look like the code is doing this, is this a TODO or a mistake? Or does 
`log.error` also throw the exception but it has a terrible name?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to