allow more exceptions to get displayed
This commit is contained in:
parent
75b6efdc51
commit
75607fc7fe
|
@ -12,9 +12,8 @@ import java.util.List;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
public class Discovery {
|
public class Discovery {
|
||||||
public static Collection<Path> find(Path start, Predicate<Path> directoryFilter, Predicate<Path> fileFilter) {
|
public static Collection<Path> find(Path start, Predicate<Path> directoryFilter, Predicate<Path> fileFilter) throws IOException {
|
||||||
List<Path> paths = new ArrayList<>();
|
List<Path> paths = new ArrayList<>();
|
||||||
try {
|
|
||||||
Files.walkFileTree(start, new SimpleFileVisitor<>() {
|
Files.walkFileTree(start, new SimpleFileVisitor<>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -33,9 +32,6 @@ public class Discovery {
|
||||||
return super.visitFile(file, attrs);
|
return super.visitFile(file, attrs);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (IOException e) {
|
|
||||||
// TODO error handling.
|
|
||||||
}
|
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,6 @@ public class FrogLoaderImpl implements FrogLoader {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (plugins.isEmpty()) {
|
if (plugins.isEmpty()) {
|
||||||
// TODO display error
|
|
||||||
throw new IllegalStateException("No plugin applicable to the current state was found!");
|
throw new IllegalStateException("No plugin applicable to the current state was found!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue