public abstract class AbstractErrorUpdateHandler extends Object implements ErrorUpdateHandler
Modifier and Type | Field and Description |
---|---|
protected AgentContext |
agentContext |
Modifier | Constructor and Description |
---|---|
protected |
AbstractErrorUpdateHandler(AgentContext agentContext) |
Modifier and Type | Method and Description |
---|---|
void |
addErrorCollection(ResultKey buildKey,
ErrorCollection errors)
Adds all the error messages in the errorCollection to the build
|
protected Long |
getCurrentAgentId() |
void |
recordElasticError(String context,
Long agentId,
Throwable throwable,
String instanceId)
Record an error resulting from Elastic Bamboo
|
void |
recordError(Key entityKey,
String context)
Record a build error against a plan/deployment
|
void |
recordError(Key entityKey,
String context,
Throwable throwable)
Record a build error against a plan/deployment
|
void |
recordError(Key entityKey,
String context,
Throwable throwable,
Map<String,String> metadata)
Record a build error against a plan/deployment
|
void |
recordError(ResultKey resultKey,
String context,
Throwable throwable)
Record an error against a result
|
void |
recordError(ResultKey resultKey,
String context,
Throwable throwable,
Map<String,String> metadata)
Record an error against a result
|
void |
recordError(String context)
Record general error
|
void |
recordError(String context,
Throwable throwable)
Record general error
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createElasticError, createError
protected final AgentContext agentContext
protected AbstractErrorUpdateHandler(AgentContext agentContext)
public void recordError(@NotNull Key entityKey, @Nullable String context)
ErrorUpdateHandler
recordError
in interface ErrorUpdateHandler
public void recordError(@NotNull Key entityKey, @Nullable String context, @NotNull Throwable throwable)
ErrorUpdateHandler
recordError
in interface ErrorUpdateHandler
public void recordError(@NotNull Key entityKey, @Nullable String context, @NotNull Throwable throwable, @Nullable Map<String,String> metadata)
ErrorUpdateHandler
recordError
in interface ErrorUpdateHandler
metadata
- additional exception detailspublic void recordError(@NotNull ResultKey resultKey, String context, @Nullable Throwable throwable)
ErrorUpdateHandler
recordError
in interface ErrorUpdateHandler
resultKey
- of the resultcontext
- messagethrowable
- errorpublic void recordError(@NotNull ResultKey resultKey, String context, @Nullable Throwable throwable, Map<String,String> metadata)
ErrorUpdateHandler
recordError
in interface ErrorUpdateHandler
resultKey
- of the resultcontext
- messagethrowable
- errormetadata
- additional exception detailspublic void recordError(String context)
ErrorUpdateHandler
recordError
in interface ErrorUpdateHandler
public void recordError(String context, @Nullable Throwable throwable)
ErrorUpdateHandler
recordError
in interface ErrorUpdateHandler
public void recordElasticError(String context, @Nullable Long agentId, @Nullable Throwable throwable, @Nullable String instanceId)
ErrorUpdateHandler
recordElasticError
in interface ErrorUpdateHandler
public void addErrorCollection(ResultKey buildKey, ErrorCollection errors)
ErrorUpdateHandler
addErrorCollection
in interface ErrorUpdateHandler
@Nullable protected Long getCurrentAgentId()
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.