]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3895 Fix violations
authorDavid Gageot <david@gageot.net>
Mon, 5 Nov 2012 09:01:22 +0000 (10:01 +0100)
committerDavid Gageot <david@gageot.net>
Mon, 5 Nov 2012 09:01:22 +0000 (10:01 +0100)
sonar-batch/src/main/java/org/sonar/batch/local/DryRunDatabase.java

index 8a5bf928576dbc88f86ab69de71b3b12c9f34c8e..c2f69706d582060dfe06da3deac2225cf35be520 100644 (file)
@@ -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;
     }