Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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.