Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-910

Redundant option failOnException

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            slachiewicz Sylwester Lachiewicz
            sjaranowski Slawomir Jaranowski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: