Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72593

Publish HTML exception is not throwing error to upstream

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Critical Critical
    • htmlpublisher-plugin
    • None

      When `publishReports` function throws IOException, it does not forward the exception to main pipeline script. The exception is just catched within the plugin function and set build result as Failure.

       

      The impact for the above is CRITICAL as the main pipeline script should fail the stage than continuing since build result is Failure.

       

      public static boolean publishReports(Run<?, ?> build, FilePath workspace, TaskListener listener,
      ...
      } catch (IOException e) {                
          Util.displayIOException(e, listener);
          e.printStackTrace(listener.fatalError("HTML Publisher failure"));                
          build.setResult(Result.FAILURE);
          return true; // THROW ERROR INSTEAD OF RETURING
      } 

            r2b2_nz Richard Bywater
            shereifsrf mohammed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: