You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Slawomir Jaranowski (Jira)" <ji...@apache.org> on 2020/05/31 23:04:00 UTC

[jira] [Created] (MSHARED-910) Redundant option failOnException

Slawomir Jaranowski created MSHARED-910:
-------------------------------------------

             Summary: Redundant option failOnException
                 Key: MSHARED-910
                 URL: https://issues.apache.org/jira/browse/MSHARED-910
             Project: Maven Shared Components
          Issue Type: Improvement
          Components: maven-script-interpreter
            Reporter: Slawomir Jaranowski


In code of {{ScriptRunner}} we have:
{code:java}
if ( failOnException )
{
    throw new RunFailureException( "The " + scriptDescription + " did not succeed. " + msg, stage );
}
else
{
    throw new RunErrorException( "The " + scriptDescription + " did not succeed. " + msg, stage, t );
}
 {code}
This cause to only throw different exception, but in client code we should catch exception regardless of this option.

I think that this complicate code of this class and code on client with process many exceptions.

My proposition:
 - remove option {{failOnException}}
 - remove exceptions: {{RunFailureException}} and {{RunErrorException}}
- throw by methods run, executeRun - {{ScriptEvaluationException}}

I can do it - after your approval.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)