aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/sonar/runner/Main.java
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-01-17 19:16:20 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2013-01-17 19:16:20 +0100
commit5d5c4140f8f4c2b2c1eea1f7840df7aad6fb5cea (patch)
tree85b5d3086d5d7b4b609b5123022e2919acc24942 /src/main/java/org/sonar/runner/Main.java
parenta10143d0914482a570ef930f2e32279438d1210d (diff)
downloadsonar-scanner-cli-5d5c4140f8f4c2b2c1eea1f7840df7aad6fb5cea.tar.gz
sonar-scanner-cli-5d5c4140f8f4c2b2c1eea1f7840df7aad6fb5cea.zip
SONARPLUGINS-2468 Improve display of errors.
Diffstat (limited to 'src/main/java/org/sonar/runner/Main.java')
-rw-r--r--src/main/java/org/sonar/runner/Main.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/sonar/runner/Main.java b/src/main/java/org/sonar/runner/Main.java
index 90994fb..9cb9d47 100644
--- a/src/main/java/org/sonar/runner/Main.java
+++ b/src/main/java/org/sonar/runner/Main.java
@@ -132,8 +132,12 @@ public final class Main {
Logs.error(message);
if (e != null) {
Logs.error(e.getMessage());
- for (Throwable cause = e.getCause(); cause != null; cause = cause.getCause()) {
+ String previousMsg = "";
+ for (Throwable cause = e.getCause(); cause != null
+ && cause.getMessage() != null
+ && !cause.getMessage().equals(previousMsg); cause = cause.getCause()) {
Logs.error("Caused by: " + cause.getMessage());
+ previousMsg = cause.getMessage();
}
}
Logs.error("");