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/06/08 14:49:26 UTC
[maven-script-interpreter] branch MSHARED-914 created (now ed2867a)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a change to branch MSHARED-914
in repository https://gitbox.apache.org/repos/asf/maven-script-interpreter.git.
at ed2867a [MSHARED-914] Detailed message from failed script shouldn't be propagated
This branch includes the following new commits:
new ed2867a [MSHARED-914] Detailed message from failed script shouldn't be propagated
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven-script-interpreter] 01/01: [MSHARED-914] Detailed message
from failed script shouldn't be propagated
Posted by sl...@apache.org.
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 <sl...@payu.pl>
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 );
}
}