[ 
https://issues.apache.org/jira/browse/MSHARED-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17158555#comment-17158555
 ] 

Sylwester Lachiewicz commented on MSHARED-910:
----------------------------------------------

+1 please prepare PR

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

Reply via email to