Skip to content

Commit f3d5da9

Browse files
committed
throw GradleException with the intended message instead of logging it
1 parent 06f88f4 commit f3d5da9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

graalpython/org.graalvm.python.gradle.plugin/src/main/java/org/graalvm/python/tasks/LockPackagesTask.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,12 @@ public void exec() throws GradleException {
7373
private void checkEmptyPackages() throws GradleException {
7474
List<String> packages = getPackages().get();
7575
if((packages == null || packages.isEmpty())) {
76-
getLog().error("");
77-
getLog().error("In order to run the graalpyLockPackages task there have to be python packages declared in the graalpy-gradle-plugin configuration.");
78-
getLog().error("");
79-
getLog().error("For more information, please refer to https://github.com/oracle/graalpython/blob/master/docs/user/Embedding-Build-Tools.md");
80-
getLog().error("");
81-
82-
throw new GradleException("missing python packages in plugin configuration");
76+
String msg = """
77+
In order to run the graalPyLockPackages task there have to be python packages declared in the graalpy-gradle-plugin configuration.
78+
79+
For more information, please refer to https://github.com/oracle/graalpython/blob/master/docs/user/Embedding-Build-Tools.md
80+
""";
81+
throw new GradleException(msg);
8382
}
8483
}
8584
}

0 commit comments

Comments
 (0)