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 AgentContextagentContext
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractErrorUpdateHandler(AgentContext agentContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddErrorCollection(ResultKey buildKey, ErrorCollection errors)Adds all the error messages in the errorCollection to the buildprotected @Nullable LonggetCurrentAgentId()voidrecordElasticError(String context, @Nullable Long agentId, @Nullable Throwable throwable, @Nullable String instanceId)Record an error resulting from Elastic BamboovoidrecordError(@NotNull Key entityKey, @Nullable String context)Record a build error against a plan/deploymentvoidrecordError(@NotNull Key entityKey, @Nullable String context, @NotNull Throwable throwable)Record a build error against a plan/deploymentvoidrecordError(@NotNull Key entityKey, @Nullable String context, @NotNull Throwable throwable, @Nullable Map<String,String> metadata)Record a build error against a plan/deploymentvoidrecordError(@NotNull ResultKey resultKey, String context, @Nullable Throwable throwable)Record an error against a resultvoidrecordError(@NotNull ResultKey resultKey, String context, @Nullable Throwable throwable, Map<String,String> metadata)Record an error against a resultvoidrecordError(String context)Record general errorvoidrecordError(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:ErrorUpdateHandlerRecord a build error against a plan/deployment- Specified by:
recordErrorin interfaceErrorUpdateHandler
-
recordError
public void recordError(@NotNull @NotNull Key entityKey, @Nullable @Nullable String context, @NotNull @NotNull Throwable throwable)Description copied from interface:ErrorUpdateHandlerRecord a build error against a plan/deployment- Specified by:
recordErrorin 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:ErrorUpdateHandlerRecord a build error against a plan/deployment- Specified by:
recordErrorin interfaceErrorUpdateHandlermetadata- additional exception details
-
recordError
public void recordError(@NotNull @NotNull ResultKey resultKey, String context, @Nullable @Nullable Throwable throwable)Description copied from interface:ErrorUpdateHandlerRecord an error against a result- Specified by:
recordErrorin 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:ErrorUpdateHandlerRecord an error against a result- Specified by:
recordErrorin interfaceErrorUpdateHandler- Parameters:
resultKey- of the resultcontext- messagethrowable- errormetadata- additional exception details
-
recordError
public void recordError(String context)
Description copied from interface:ErrorUpdateHandlerRecord general error- Specified by:
recordErrorin interfaceErrorUpdateHandler
-
recordError
public void recordError(String context, @Nullable @Nullable Throwable throwable)
Description copied from interface:ErrorUpdateHandlerRecord general error- Specified by:
recordErrorin interfaceErrorUpdateHandler
-
recordElasticError
public void recordElasticError(String context, @Nullable @Nullable Long agentId, @Nullable @Nullable Throwable throwable, @Nullable @Nullable String instanceId)
Description copied from interface:ErrorUpdateHandlerRecord an error resulting from Elastic Bamboo- Specified by:
recordElasticErrorin interfaceErrorUpdateHandler
-
addErrorCollection
public void addErrorCollection(ResultKey buildKey, ErrorCollection errors)
Description copied from interface:ErrorUpdateHandlerAdds all the error messages in the errorCollection to the build- Specified by:
addErrorCollectionin interfaceErrorUpdateHandler
-
getCurrentAgentId
@Nullable protected @Nullable Long getCurrentAgentId()
-
-