If the queryPath does not exists, we get no error message:
.\gradlew
> Configure project :
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\opt\local\github.imce-demos\msr-fse-demo1\build.gradle' line: 400
* What went wrong:
A problem occurred evaluating root project 'msr-fse-demo1'.
> C:\opt\local\github.imce-demos\msr-fse-demo1\src\shacl
> C:\opt\local\github.imce-demos\msr-fse-demo1\src\shacl
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
With --stacktrace, we find that the exception comes from this code:
protected void calculateInputOutputFiles() {
if (null != queryPath && null != resultPath) {
final List<File> inputFiles = new ArrayList<>();
final List<File> outputFiles = new ArrayList<>();
if (queryPath.isFile()) {
inputFiles.add(queryPath);
} else {
// See https://docs.oracle.com/javase/8/docs/api/java/nio/file/DirectoryStream.html
try (DirectoryStream<Path> stream = Files.newDirectoryStream(queryPath.toPath(), "*.shacl")) {
for (Path entry : stream) {
inputFiles.add(entry.toFile());
}
} catch (DirectoryIteratorException ex) {
throw new ProjectConfigurationException(ex.getCause().getMessage(), ex.getCause());
} catch (IOException e) {
throw new ProjectConfigurationException(e.getMessage(), e); // here
}
}
...
Tried to throw GradleException -- still no message.
Fixes #29
There could be an improvement for this example:
If the
queryPath
does not exists, we get no error message:With
--stacktrace
, we find that the exception comes from this code:Tried to throw
GradleException
-- still no message.