Class FailFastProblemReporter
- java.lang.Object
- org.springframework.beans.factory.parsing.FailFastProblemReporter
- All Implemented Interfaces:
ProblemReporter
public class FailFastProblemReporter extends Object implements ProblemReporter
SimpleProblemReporterimplementation that exhibits fail-fast behavior when errors are encountered.The first error encountered results in a
BeanDefinitionParsingExceptionbeing thrown.Warnings are written to
the logfor this class.- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller, Rick Evans
Constructor Summary
Constructors Constructor Description FailFastProblemReporter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(Problem problem)Throws aBeanDefinitionParsingExceptiondetailing the error that has occurred.voidfatal(Problem problem)Throws aBeanDefinitionParsingExceptiondetailing the error that has occurred.voidsetLogger(Log logger)Set theloggerthat is to be used to report warnings.voidwarning(Problem problem)
Constructor Detail
FailFastProblemReporter
public FailFastProblemReporter()
Method Detail
setLogger
public void setLogger(Log logger)
Set theloggerthat is to be used to report warnings.If set to
nullthen a defaultloggerset to the name of the instance class will be used.- Parameters:
logger- theloggerthat is to be used to report warnings
fatal
public void fatal(Problem problem)
Throws aBeanDefinitionParsingExceptiondetailing the error that has occurred.- Specified by:
fatalin interfaceProblemReporter- Parameters:
problem- the source of the error
error
public void error(Problem problem)
Throws aBeanDefinitionParsingExceptiondetailing the error that has occurred.- Specified by:
errorin interfaceProblemReporter- Parameters:
problem- the source of the error
warning
public void warning(Problem problem)
- Specified by:
warningin interfaceProblemReporter- Parameters:
problem- the source of the warning