You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/07/15 17:06:05 UTC
[maven-script-interpreter] 02/02: [MSHARED-914] Detailed message
from failed script shouldn't be propagated
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 a58c5d5c9f751ce6a2369396d03c40e79c0f4a3b
Author: Slawomir Jaranowski <sl...@payu.pl>
AuthorDate: Sun Jun 7 15:38:21 2020 +0200
[MSHARED-914] Detailed message from failed script shouldn't be propagated
Closes #6
---
.../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 );
}
}