Skip to content

Commit

Permalink
JENKINS-26604 Removes try-catch from GlobalSettingsProvider unhelpful…
Browse files Browse the repository at this point in the history
…ly which swallows exceptions

If there is a problem providing the Maven global settings file configured by the user, the build
should end in error. This is the behavior of SettingsProvider but not of GlobalSettingsProvider, which
was swallowing the exception and printing only a warning, without details of the exception.
  • Loading branch information
akbertram committed Jan 26, 2015
1 parent a66c06f commit 77bc6ad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/src/main/java/jenkins/mvn/GlobalSettingsProvider.java
Expand Up @@ -51,11 +51,7 @@ public static GlobalSettingsProvider parseSettingsProvider(StaplerRequest req) t
public static final FilePath getSettingsFilePath(GlobalSettingsProvider settings, AbstractBuild<?, ?> build, TaskListener listener) {
FilePath settingsPath = null;
if (settings != null) {
try {
settingsPath = settings.supplySettings(build, listener);
} catch (Exception e) {
listener.getLogger().print("failed to get the path to the alternate global settings.xml");
}
settingsPath = settings.supplySettings(build, listener);
}
return settingsPath;
}
Expand Down

0 comments on commit 77bc6ad

Please sign in to comment.