You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sylwester Lachiewicz (Jira)" <ji...@apache.org> on 2020/07/22 22:16:00 UTC

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

     [ https://issues.apache.org/jira/browse/MSHARED-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylwester Lachiewicz updated MSHARED-910:
-----------------------------------------
    Fix Version/s: maven-script-interpreter-1.3

> 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
>            Assignee: Sylwester Lachiewicz
>            Priority: Major
>             Fix For: maven-script-interpreter-1.3
>
>
> 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)