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

slachiewicz pushed a commit to branch MSHARED-914
in repository https://gitbox.apache.org/repos/asf/maven-script-interpreter.git

commit ed2867a962ceb6af2e7f90e199a271be125d37b1
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Sun Jun 7 15:38:21 2020 +0200

    [MSHARED-914] Detailed message from failed script shouldn't be propagated
---
 .../apache/maven/shared/scriptinterpreter/ScriptRunner.java   | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java 
b/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java
index d30e8f7..850055e 100644
--- a/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java
+++ b/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java
@@ -239,23 +239,18 @@ public class ScriptRunner
         catch ( ScriptEvaluationException e )
         {
             Throwable t = ( e.getCause() != null ) ? e.getCause() : e;
-            String msg = ( t.getMessage() != null ) ? t.getMessage() : 
t.toString();
-            if ( LOG.isDebugEnabled() )
-            {
-                String errorMessage = "Error evaluating " + scriptDescription 
+ " " + scriptFile.getPath() + ", " + t;
-                LOG.debug( errorMessage, t );
-            }
             if ( logger != null )
             {
                 t.printStackTrace( logger.getPrintStream() );
             }
+
             if ( failOnException )
             {
-                throw new RunFailureException( "The " + scriptDescription + " 
did not succeed. " + msg, stage );
+                throw new RunFailureException( "The " + scriptDescription + " 
did not succeed.", stage );
             }
             else
             {
-                throw new RunErrorException( "The " + scriptDescription + " 
did not succeed. " + msg, stage, t );
+                throw new RunErrorException( "The " + scriptDescription + " 
did not succeed.", stage, t );
             }
         }
 

Reply via email to