Package com.atlassian.bamboo.logger
Class AbstractErrorUpdateHandler
- java.lang.Object
-
- com.atlassian.bamboo.logger.AbstractErrorUpdateHandler
-
- All Implemented Interfaces:
ErrorUpdateHandler
- Direct Known Subclasses:
DefaultErrorHandler
,RemoteErrorUpdateHandler
public abstract class AbstractErrorUpdateHandler extends Object implements ErrorUpdateHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected AgentContext
agentContext
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractErrorUpdateHandler(AgentContext agentContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addErrorCollection(ResultKey buildKey, ErrorCollection errors)
Adds all the error messages in the errorCollection to the buildprotected @Nullable Long
getCurrentAgentId()
void
recordElasticError(String context, @Nullable Long agentId, @Nullable Throwable throwable, @Nullable String instanceId)
Record an error resulting from Elastic Bamboovoid
recordError(@NotNull Key entityKey, @Nullable String context)
Record a build error against a plan/deploymentvoid
recordError(@NotNull Key entityKey, @Nullable String context, @NotNull Throwable throwable)
Record a build error against a plan/deploymentvoid
recordError(@NotNull Key entityKey, @Nullable String context, @NotNull Throwable throwable, @Nullable Map<String,String> metadata)
Record a build error against a plan/deploymentvoid
recordError(@NotNull ResultKey resultKey, String context, @Nullable Throwable throwable)
Record an error against a resultvoid
recordError(@NotNull ResultKey resultKey, String context, @Nullable Throwable throwable, Map<String,String> metadata)
Record an error against a resultvoid
recordError(String context)
Record general errorvoid
recordError(String context, @Nullable Throwable throwable)
Record general error-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.logger.ErrorUpdateHandler
createElasticError, createError, createError
-
-
-
-
Field Detail
-
agentContext
protected final AgentContext agentContext
-
-
Constructor Detail
-
AbstractErrorUpdateHandler
protected AbstractErrorUpdateHandler(AgentContext agentContext)
-
-
Method Detail
-
recordError
public void recordError(@NotNull @NotNull Key entityKey, @Nullable @Nullable String context)
Description copied from interface:ErrorUpdateHandler
Record a build error against a plan/deployment- Specified by:
recordError
in interfaceErrorUpdateHandler
-
recordError
public void recordError(@NotNull @NotNull Key entityKey, @Nullable @Nullable String context, @NotNull @NotNull Throwable throwable)
Description copied from interface:ErrorUpdateHandler
Record a build error against a plan/deployment- Specified by:
recordError
in interfaceErrorUpdateHandler
-
recordError
public void recordError(@NotNull @NotNull Key entityKey, @Nullable @Nullable String context, @NotNull @NotNull Throwable throwable, @Nullable @Nullable Map<String,String> metadata)
Description copied from interface:ErrorUpdateHandler
Record a build error against a plan/deployment- Specified by:
recordError
in interfaceErrorUpdateHandler
metadata
- additional exception details
-
recordError
public void recordError(@NotNull @NotNull ResultKey resultKey, String context, @Nullable @Nullable Throwable throwable)
Description copied from interface:ErrorUpdateHandler
Record an error against a result- Specified by:
recordError
in interfaceErrorUpdateHandler
- Parameters:
resultKey
- of the resultcontext
- messagethrowable
- error
-
recordError
public void recordError(@NotNull @NotNull ResultKey resultKey, String context, @Nullable @Nullable Throwable throwable, Map<String,String> metadata)
Description copied from interface:ErrorUpdateHandler
Record an error against a result- Specified by:
recordError
in interfaceErrorUpdateHandler
- Parameters:
resultKey
- of the resultcontext
- messagethrowable
- errormetadata
- additional exception details
-
recordError
public void recordError(String context)
Description copied from interface:ErrorUpdateHandler
Record general error- Specified by:
recordError
in interfaceErrorUpdateHandler
-
recordError
public void recordError(String context, @Nullable @Nullable Throwable throwable)
Description copied from interface:ErrorUpdateHandler
Record general error- Specified by:
recordError
in interfaceErrorUpdateHandler
-
recordElasticError
public void recordElasticError(String context, @Nullable @Nullable Long agentId, @Nullable @Nullable Throwable throwable, @Nullable @Nullable String instanceId)
Description copied from interface:ErrorUpdateHandler
Record an error resulting from Elastic Bamboo- Specified by:
recordElasticError
in interfaceErrorUpdateHandler
-
addErrorCollection
public void addErrorCollection(ResultKey buildKey, ErrorCollection errors)
Description copied from interface:ErrorUpdateHandler
Adds all the error messages in the errorCollection to the build- Specified by:
addErrorCollection
in interfaceErrorUpdateHandler
-
getCurrentAgentId
@Nullable protected @Nullable Long getCurrentAgentId()
-
-