From: David Gageot Date: Mon, 5 Nov 2012 09:01:22 +0000 (+0100) Subject: SONAR-3895 Fix violations X-Git-Tag: 3.4~401 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=81b76d8b6cbc8cc685c57e42d7a9c5a8dfac2ab6;p=sonarqube.git SONAR-3895 Fix violations --- diff --git a/sonar-batch/src/main/java/org/sonar/batch/local/DryRunDatabase.java b/sonar-batch/src/main/java/org/sonar/batch/local/DryRunDatabase.java index 8a5bf928576..c2f69706d58 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/local/DryRunDatabase.java +++ b/sonar-batch/src/main/java/org/sonar/batch/local/DryRunDatabase.java @@ -86,9 +86,9 @@ public class DryRunDatabase implements BatchComponent { } catch (SonarException e) { Throwable rootCause = Throwables.getRootCause(e); if (rootCause instanceof FileNotFoundException) { - throw new SonarException(String.format("Project [%s] doesn't exist on server", projectKey)); + throw new SonarException(String.format("Project [%s] doesn't exist on server", projectKey), e); } else if ((rootCause instanceof IOException) && (StringUtils.contains(rootCause.getMessage(), "401"))) { - throw new SonarException(String.format("You don't have access rights to project [%s]", projectKey)); + throw new SonarException(String.format("You don't have access rights to project [%s]", projectKey), e); } throw e; }