|
||||||||||
| 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 ErrorHandlerpublic void suspendTroublesomeBuild(Build build)
ErrorHandler
suspendTroublesomeBuild in interface ErrorHandlerbuild - - must not be null
public void recordError(String buildName,
String context,
Throwable throwable)
ErrorHandler
recordError in interface ErrorHandlerbuildName - The buildthrowable - The errorpublic Collection getErrors(String buildName)
ErrorHandler
getErrors in interface ErrorHandlerbuildName - The build
ErrorDetailspublic Collection getAllErrors()
ErrorHandler
getAllErrors in interface ErrorHandlerErrorDetailspublic void clear()
ErrorHandler
clear in interface ErrorHandlerpublic void setMaxQueueSize(int queueSize)
public void removeError(String buildName,
int errorNumber)
ErrorHandler
removeError in interface ErrorHandlerbuildName - The build containing the errorerrorNumber - The errorIndex'th error to be associated with the build
public ErrorDetails getErrorDetails(String buildName,
int errorNumber)
ErrorHandler
getErrorDetails in interface ErrorHandlerbuildName - 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 ErrorHandlername - The name of the build
public void addErrorCollection(String buildName,
ErrorCollection errors)
ErrorHandler
addErrorCollection in interface ErrorHandlerpublic void setBuildManager(BuildManager buildManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||