|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.logger.DefaultErrorHandler
public class DefaultErrorHandler
This class keeps track of Bamboo build errors so they can get reported to the user.
Field Summary | |
---|---|
static int |
BUILD_ERROR_LIMIT
|
Constructor Summary | |
---|---|
DefaultErrorHandler()
|
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 name)
Remove all the errors for a given build |
void |
removeError(String buildName,
int errorNumber)
Remove a specific error from the handler. |
void |
setBuildManager(BuildManager buildManager)
|
void |
setMaxQueueSize(int queueSize)
|
void |
suspendTroublesomeBuild(Build build)
Sespends a build if it's reached a maximum theshold of errors |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BUILD_ERROR_LIMIT
Constructor Detail |
---|
public DefaultErrorHandler()
Method Detail |
---|
public void recordError(String buildName, String context)
recordError
in interface ErrorHandler
public void suspendTroublesomeBuild(Build build)
ErrorHandler
suspendTroublesomeBuild
in interface ErrorHandler
build
- - must not be nullpublic void recordError(String buildName, String context, Throwable throwable)
ErrorHandler
recordError
in interface ErrorHandler
buildName
- The buildthrowable
- The errorpublic Collection getErrors(String buildName)
ErrorHandler
getErrors
in interface ErrorHandler
buildName
- The build
ErrorDetails
public Collection getAllErrors()
ErrorHandler
getAllErrors
in interface ErrorHandler
ErrorDetails
public void clear()
ErrorHandler
clear
in interface ErrorHandler
public void setMaxQueueSize(int queueSize)
public void removeError(String buildName, int errorNumber)
ErrorHandler
removeError
in interface ErrorHandler
buildName
- The build containing the errorerrorNumber
- The errorIndex'th error to be associated with the buildpublic ErrorDetails getErrorDetails(String buildName, int errorNumber)
ErrorHandler
getErrorDetails
in interface ErrorHandler
buildName
- The build containing the error.errorNumber
- The errorIndex'th error to be associated with the build
public void removeBuildErrors(String name)
ErrorHandler
removeBuildErrors
in interface ErrorHandler
name
- The name of the buildpublic void addErrorCollection(String buildName, ErrorCollection errors)
ErrorHandler
addErrorCollection
in interface ErrorHandler
public void setBuildManager(BuildManager buildManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |