Skip to content

[MSHARED-910] Redundant option failOnException #140

@jira-importer

Description

@jira-importer

Slawomir Jaranowski opened MSHARED-910 and commented

In code of ScriptRunner we have:

if ( failOnException )
{
    throw new RunFailureException( "The " + scriptDescription + " did not succeed. " + msg, stage );
}
else
{
    throw new RunErrorException( "The " + scriptDescription + " did not succeed. " + msg, stage, t );
}
 

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.


Remote Links:

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions