Interface ErrorHandler

All Known Implementing Classes:
ChangingBuildStatusErrorHandler, CombineErrorHandler, ShallowAnyErrorHandler, StatusErrorHandler

public interface ErrorHandler
So you can implement bunch of ErrorHandlers and log, rethrow, ignore exception. Useful to control own step exceptions (for example GitHubCommitStatusSetter)
Since:
1.19.0
Author:
lanwen (Merkushev Kirill)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    handle(Exception e, Run<?,?> run, TaskListener listener)
    Normally should return true if exception is handled and no other handler should do anything.
  • Method Details

    • handle

      boolean handle(Exception e, @NonNull Run<?,?> run, @NonNull TaskListener listener) throws Exception
      Normally should return true if exception is handled and no other handler should do anything. If you will return false, the next error handler should try to handle this exception
      Parameters:
      e - exception to handle (log, ignore, process, rethrow)
      run - run object from the step
      listener - listener object from the step
      Returns:
      true if exception handled successfully
      Throws:
      Exception - you can rethrow exception of any type