Class ChangingBuildStatusErrorHandler

All Implemented Interfaces:
ExtensionPoint, Describable<StatusErrorHandler>, ErrorHandler

public class ChangingBuildStatusErrorHandler extends StatusErrorHandler
Can change build status in case of errors
Since:
1.19.0
Author:
lanwen (Merkushev Kirill)
  • Constructor Details

    • ChangingBuildStatusErrorHandler

      @DataBoundConstructor public ChangingBuildStatusErrorHandler(String result)
  • Method Details

    • getResult

      public String getResult()
    • handle

      public boolean handle(Exception e, @NonNull Run<?,?> run, @NonNull TaskListener listener)
      Logs error to build console and changes build result
      Parameters:
      e - exception to handle (log, ignore, process, rethrow)
      run - run object from the step
      listener - listener object from the step
      Returns:
      true as of it terminating handler