Interface ErrorHandler
- All Known Implementing Classes:
ChangingBuildStatusErrorHandler
,CombineErrorHandler
,ShallowAnyErrorHandler
,StatusErrorHandler
public interface ErrorHandler
So you can implement bunch of
ErrorHandler
s 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 TypeMethodDescriptionboolean
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
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
-