Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.logger
Class DefaultErrorHandler

    java.lang.Object
      com.atlassian.bamboo.logger.DefaultErrorHandler

All Implemented Interfaces:
  ErrorHandler

    public class DefaultErrorHandler

extends Object
implements ErrorHandler

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

### BUILD_ERROR_LIMIT

    public static final int BUILD_ERROR_LIMIT

See Also:
  Constant Field Values

Constructor Detail

### DefaultErrorHandler

    public DefaultErrorHandler()

Method Detail

### recordError

    public void recordError(String buildName,
                            String context)

  Specified by:
    `recordError` in interface `ErrorHandler`

### suspendTroublesomeBuild

    public void suspendTroublesomeBuild(Build build)

  Description copied from interface: `ErrorHandler`
  Sespends a build if it's reached a maximum theshold of errors

  Specified by:
    `suspendTroublesomeBuild` in interface `ErrorHandler`
  Parameters:
    `build` - - must not be null

### recordError

    public void recordError(String buildName,
                            String context,
                            Throwable throwable)

  Description copied from interface: `ErrorHandler`
  Record a build error against a build

  Specified by:
    `recordError` in interface `ErrorHandler`
  Parameters:
    `buildName` - The build
    `throwable` - The error

### getErrors

    public Collection getErrors(String buildName)

  Description copied from interface: `ErrorHandler`
  Obtain all the errors recorded against a specific build

  Specified by:
    `getErrors` in interface `ErrorHandler`
  Parameters:
    `buildName` - The build
  Returns:
    The collection `ErrorDetails`

### getAllErrors

    public Collection getAllErrors()

  Description copied from interface: `ErrorHandler`
  Get all the errors recorded against all builds

  Specified by:
    `getAllErrors` in interface `ErrorHandler`
  Returns:
    The collection `ErrorDetails`

### clear

    public void clear()

  Description copied from interface: `ErrorHandler`
  Remove all errors from the handler

  Specified by:
    `clear` in interface `ErrorHandler`

### setMaxQueueSize

    public void setMaxQueueSize(int queueSize)

### removeError

    public void removeError(String buildName,
                            int errorNumber)

  Description copied from interface: `ErrorHandler`
  Remove a specific error from the handler.

  Specified by:
    `removeError` in interface `ErrorHandler`
  Parameters:
    `buildName` - The build containing the error
    `errorNumber` - The errorIndex'th error to be associated with the build

### getErrorDetails

    public ErrorDetails getErrorDetails(String buildName,
                                        int errorNumber)

  Description copied from interface: `ErrorHandler`
  Obtain the specifed error from the handler.

  Specified by:
    `getErrorDetails` in interface `ErrorHandler`
  Parameters:
    `buildName` - The build containing the error.
    `errorNumber` - The errorIndex'th error to be associated with the build
  Returns:
    The error details

### removeBuildErrors

    public void removeBuildErrors(String name)

  Description copied from interface: `ErrorHandler`
  Remove all the errors for a given build

  Specified by:
    `removeBuildErrors` in interface `ErrorHandler`
  Parameters:
    `name` - The name of the build

### addErrorCollection

    public void addErrorCollection(String buildName,
                                   ErrorCollection errors)

  Description copied from interface: `ErrorHandler`
  Adds all the error messages in the errorCollection to the build

  Specified by:
    `addErrorCollection` in interface `ErrorHandler`

### setBuildManager

    public void setBuildManager(BuildManager buildManager)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.