com.atlassian.bamboo.logger
Interface ErrorHandler

All Known Implementing Classes:
DefaultErrorHandler

public interface ErrorHandler

Describes an abstraction for dealing with errors that occure while building builds.


Method Summary
 void addErrorCollection(String buildName, ErrorCollection errors)
          Adds all the error messages in the errorCollection to the build
 void clear()
          Remove all errors from the handler
 Collection getAllErrors()
          Get all the errors recorded against all builds
 ErrorDetails getErrorDetails(String buildName, int errorNumber)
          Obtain the specifed error from the handler.
 Collection getErrors(String buildName)
          Obtain all the errors recorded against a specific build
 void recordError(String buildName, String context)
           
 void recordError(String buildName, String context, Throwable throwable)
          Record a build error against a build
 void removeBuildErrors(String buildName)
          Remove all the errors for a given build
 void removeError(String buildName, int errorIndex)
          Remove a specific error from the handler.
 void suspendTroublesomeBuild(Build build)
          Sespends a build if it's reached a maximum theshold of errors
 

Method Detail

recordError

void recordError(String buildName,
                 String context,
                 Throwable throwable)
Record a build error against a build

Parameters:
buildName - The build
context -
throwable - The error

getErrors

Collection getErrors(String buildName)
Obtain all the errors recorded against a specific build

Parameters:
buildName - The build
Returns:
The collection ErrorDetails

getAllErrors

Collection getAllErrors()
Get all the errors recorded against all builds

Returns:
The collection ErrorDetails

clear

void clear()
Remove all errors from the handler


removeError

void removeError(String buildName,
                 int errorIndex)
Remove a specific error from the handler.

Parameters:
buildName - The build containing the error
errorIndex - The errorIndex'th error to be associated with the build

getErrorDetails

ErrorDetails getErrorDetails(String buildName,
                             int errorNumber)
Obtain the specifed error from the handler.

Parameters:
buildName - The build containing the error.
errorNumber - The errorIndex'th error to be associated with the build
Returns:
The error details

removeBuildErrors

void removeBuildErrors(String buildName)
Remove all the errors for a given build

Parameters:
buildName - The name of the build

addErrorCollection

void addErrorCollection(String buildName,
                        ErrorCollection errors)
Adds all the error messages in the errorCollection to the build

Parameters:
buildName -
errors -

recordError

void recordError(String buildName,
                 String context)

suspendTroublesomeBuild

void suspendTroublesomeBuild(Build build)
Sespends a build if it's reached a maximum theshold of errors

Parameters:
build - - must not be null


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.