Skip to content

Commit

Permalink
Use more specific exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Apr 19, 2023
1 parent 39f5038 commit d959146
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@

import javax.inject.Named;

import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;

import org.codehaus.plexus.util.xml.pull.MXParser;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;

@Named
public class DefaultRootLocator implements RootLocator {
Expand All @@ -45,7 +47,7 @@ public boolean isRootDirectory(Path dir) {
}
}
}
} catch (Exception e) {
} catch (IOException | XmlPullParserException e) {
// The root locator can be used very early during the setup of Maven,
// even before the arguments from the command line are parsed. Any exception
// that would happen here should cause the build to fail at a later stage
Expand Down

0 comments on commit d959146

Please sign in to comment.