aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2018-02-09 10:04:34 +0100
committerDuarte Meneses <duarte.meneses@sonarsource.com>2018-02-09 11:45:37 +0100
commitc1a9442546346aeaa8fd1d43535783af0face16c (patch)
tree87277e81dc3f4aefa3fb9fa3912d7bfa664bd747 /sonar-scanner-engine
parente22000509bf6734f602c21af925ed372ab7b8b8f (diff)
downloadsonarqube-c1a9442546346aeaa8fd1d43535783af0face16c.tar.gz
sonarqube-c1a9442546346aeaa8fd1d43535783af0face16c.zip
SONAR-10071 Omit stack trace when SCM provider autodetection failed
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java
index 89db46b1fc7..55931063274 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmConfiguration.java
@@ -35,6 +35,7 @@ import org.sonar.api.batch.ScannerSide;
import org.sonar.api.batch.fs.internal.InputModuleHierarchy;
import org.sonar.api.batch.scm.ScmProvider;
import org.sonar.api.config.Configuration;
+import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
@@ -127,7 +128,7 @@ public class ScmConfiguration implements Startable {
if (this.provider == null) {
this.provider = installedProvider;
} else {
- throw new IllegalStateException("SCM provider autodetection failed. Both " + this.provider.key() + " and " + installedProvider.key()
+ throw MessageException.of("SCM provider autodetection failed. Both " + this.provider.key() + " and " + installedProvider.key()
+ " claim to support this project. Please use " + CoreProperties.SCM_PROVIDER_KEY + " to define SCM of your project.");
}
}