Skip to content

Commit

Permalink
CH : print stack trace in console log
Browse files Browse the repository at this point in the history
  • Loading branch information
sokratis.sidereas committed Apr 5, 2024
1 parent 0241c42 commit 70b7dd5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import org.apache.commons.lang3.exception.ExceptionUtils;

import com.google.common.base.Stopwatch;
import com.google.common.base.Strings;
import com.jenkins.testresultsaggregator.data.BuildWithDetailsAggregator;
Expand Down Expand Up @@ -136,7 +138,7 @@ private JobWithDetailsAggregator getDetailsMode(Job job, int mode) throws Except
throw ex;
} else {
errorFound = new StringBuilder();
errorFound.append("Error get details for job '" + job.getJobName() + "' " + ex.getMessage());
errorFound.append("Error get details for job '" + job.getJobName() + "' " + ex.getMessage() + " stacktrace " + ExceptionUtils.getStackTrace(ex));
}
}
retries++;
Expand Down Expand Up @@ -165,7 +167,7 @@ private BuildWithDetailsAggregator getLastBuildDetailsMode(Job job, int mode) th
throw ex;
} else {
errorFound = new StringBuilder();
errorFound.append("No last build details for job '" + job.getJobName() + "' " + ex.getMessage());
errorFound.append("No last build details for job '" + job.getJobName() + "' " + ex.getMessage() + " stacktrace " + ExceptionUtils.getStackTrace(ex));
}
}
retries++;
Expand Down Expand Up @@ -201,7 +203,7 @@ public BuildWithDetailsAggregator getBuildDetailsMode(Job job, Integer number, i
throw ex;
} else {
errorFound = new StringBuilder();
errorFound.append("No build details for job '" + job.getJobName() + "' with number " + number + " " + ex.getMessage());
errorFound.append("No build details for job '" + job.getJobName() + "' with number " + number + " " + ex.getMessage() + " stacktrace " + ExceptionUtils.getStackTrace(ex));

Check warning on line 206 in src/main/java/com/jenkins/testresultsaggregator/actions/Collector.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 141-206 are not covered by tests
}
}
retries++;
Expand Down

0 comments on commit 70b7dd5

Please sign in to comment.