maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylwester Lachiewicz (Jira)" <j...@apache.org>
Subject [jira] [Assigned] (MSHARED-910) Redundant option failOnException
Date Wed, 22 Jul 2020 22:16:00 GMT

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

Sylwester Lachiewicz reassigned MSHARED-910:
--------------------------------------------

    Assignee: Sylwester Lachiewicz

> 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
>
> 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)

Mime
View raw message