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 Details

  • Constructor Details

    • AbstractErrorUpdateHandler

      protected AbstractErrorUpdateHandler(AgentContext agentContext)
  • Method Details

    • 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 interface ErrorUpdateHandler
      Parameters:
      entityKey -
      context -
    • 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 interface ErrorUpdateHandler
      Parameters:
      entityKey -
      context -
      throwable -
    • 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 interface ErrorUpdateHandler
      Parameters:
      entityKey -
      context -
      throwable -
      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 interface ErrorUpdateHandler
      Parameters:
      resultKey - of the result
      context - message
      throwable - 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 interface ErrorUpdateHandler
      Parameters:
      resultKey - of the result
      context - message
      throwable - error
      metadata - additional exception details
    • recordError

      public void recordError(String context)
      Description copied from interface: ErrorUpdateHandler
      Record general error
      Specified by:
      recordError in interface ErrorUpdateHandler
      Parameters:
      context -
    • recordError

      public void recordError(String context, @Nullable @Nullable Throwable throwable)
      Description copied from interface: ErrorUpdateHandler
      Record general error
      Specified by:
      recordError in interface ErrorUpdateHandler
      Parameters:
      context -
      throwable -
    • 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 interface ErrorUpdateHandler
      Parameters:
      context -
      agentId -
      throwable -
      instanceId -
    • 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 interface ErrorUpdateHandler
      Parameters:
      buildKey -
      errors -
    • getCurrentAgentId

      @Nullable protected @Nullable Long getCurrentAgentId()