Interface ErrorHandler
-
- All Known Implementing Classes:
ChangingBuildStatusErrorHandler
,CombineErrorHandler
,ShallowAnyErrorHandler
,StatusErrorHandler
public interface ErrorHandler
So you can implement bunch ofErrorHandler
s and log, rethrow, ignore exception. Useful to control own step exceptions (for exampleGitHubCommitStatusSetter
)- Since:
- 1.19.0
- Author:
- lanwen (Merkushev Kirill)
-
-
Method Summary
All Methods Instance Methods Abstract Methods 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 Detail
-
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 steplistener
- listener object from the step- Returns:
- true if exception handled successfully
- Throws:
Exception
- you can rethrow exception of any type
-
-