You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/06/11 01:40:57 UTC

[groovy] 02/03: Fix missleading error message in GroovyScriptEngine

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 5d875ed9a72d0051f56c89ce3e9eaf40423850b1
Author: aalku <aa...@gmail.com>
AuthorDate: Fri Jun 10 14:22:28 2022 +0200

    Fix missleading error message in GroovyScriptEngine
    
    The error message is missleading and needs a fix. Otherwise it can show "Cannot open URL: folderfile" instead of "folder/file" and the user might wonder why is it looking for "folderfile".
---
 src/main/java/groovy/util/GroovyScriptEngine.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/groovy/util/GroovyScriptEngine.java b/src/main/java/groovy/util/GroovyScriptEngine.java
index 829dbaabb7..d58401a212 100644
--- a/src/main/java/groovy/util/GroovyScriptEngine.java
+++ b/src/main/java/groovy/util/GroovyScriptEngine.java
@@ -378,7 +378,7 @@ public class GroovyScriptEngine implements ResourceConnector {
                     se = new ResourceException(message, se);
                 }
             } catch (IOException e1) {
-                String message = "Cannot open URL: " + root + resourceName;
+                String message = "Cannot open URL: " + root + ", " + resourceName;
                 groovyScriptConn = null;
                 if (se == null) {
                     se = new ResourceException(message);