Package org.apache.tools.ant.taskdefs.optional

# Class XMLValidateTask.ValidatorErrorHandler

java.lang.Object
org.apache.tools.ant.taskdefs.optional.XMLValidateTask.ValidatorErrorHandler

All Implemented Interfaces:
  `ErrorHandler`

Enclosing class:
  `XMLValidateTask`

protected class XMLValidateTask.ValidatorErrorHandler extends Object implements ErrorHandler
ValidatorErrorHandler role :

- log SAX parse exceptions,
- remember if an error occurred

## Field Summary

Fields
Modifier and Type
Field
Description
`protected File`
`currentFile`
`protected boolean`
`failed`
`protected String`
`lastErrorMessage`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ValidatorErrorHandler()`

## Method Summary

Modifier and Type
Method
Description
`void`
`error(SAXParseException exception)`
receive notification of a recoverable error
`void`
`fatalError(SAXParseException exception)`
record a fatal error
`boolean`
`getFailure()`
did an error happen during last parsing ?
`void`
`init(File file)`
initialises the class
`void`
`warning(SAXParseException exception)`
receive notification of a warning

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### currentFile

protected File currentFile

### lastErrorMessage

protected String lastErrorMessage

### failed

protected boolean failed

## Constructor Details

### ValidatorErrorHandler

protected ValidatorErrorHandler()

## Method Details

### init

public void init(File file)
initialises the class

Parameters:
  `file` - file used

### getFailure

public boolean getFailure()
did an error happen during last parsing ?

Returns:
  did an error happen during last parsing ?

### fatalError

public void fatalError(SAXParseException exception)
record a fatal error

Specified by:
  `fatalError` in interface `ErrorHandler`
Parameters:
  `exception` - the fatal error

### error

public void error(SAXParseException exception)
receive notification of a recoverable error

Specified by:
  `error` in interface `ErrorHandler`
Parameters:
  `exception` - the error

### warning

public void warning(SAXParseException exception)
receive notification of a warning

Specified by:
  `warning` in interface `ErrorHandler`
Parameters:
  `exception` - the warning