diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-10-24 13:05:44 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-10-24 13:05:44 +0400 |
commit | 5636c4efae827b345ad1ec15de0b7c1dfa4814c6 (patch) | |
tree | 61814637afb5792055319956c20b655b9db412d2 /plugins/sonar-squid-java-plugin | |
parent | 1e1186f78e87d614db5a6f8860c9bfcbbb07a127 (diff) | |
download | sonarqube-5636c4efae827b345ad1ec15de0b7c1dfa4814c6.tar.gz sonarqube-5636c4efae827b345ad1ec15de0b7c1dfa4814c6.zip |
SONAR-2715 Provide meaningful exception message, when source file cannot be imported
Diffstat (limited to 'plugins/sonar-squid-java-plugin')
-rw-r--r-- | plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java index e8c0cf381e3..2ee116ca0d7 100644 --- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java +++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java @@ -30,7 +30,6 @@ import org.sonar.api.resources.*; import org.sonar.api.utils.SonarException; import org.sonar.java.api.JavaUtils; -import java.io.IOException; import java.nio.charset.Charset; import java.util.List; @@ -84,7 +83,7 @@ public final class JavaSourceImporter implements Sensor { context.saveSource(javaFile, source); } - } catch (IOException e) { + } catch (Exception e) { throw new SonarException("Unable to read and import the source file : '" + inputFile.getFile().getAbsolutePath() + "' with the charset : '" + sourcesEncoding.name() + "'.", e); } |