Class FailFastProblemReporter
- java.lang.Object
- org.springframework.beans.factory.parsing.FailFastProblemReporter
- All Implemented Interfaces:
ProblemReporter
public class FailFastProblemReporter extends Object implements ProblemReporter
SimpleProblemReporter
implementation that exhibits fail-fast behavior when errors are encountered.The first error encountered results in a
BeanDefinitionParsingException
being thrown.Warnings are written to
the log
for 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 void
error(Problem problem)
Throws aBeanDefinitionParsingException
detailing the error that has occurred.void
fatal(Problem problem)
Throws aBeanDefinitionParsingException
detailing the error that has occurred.void
setLogger(Log logger)
Set thelogger
that is to be used to report warnings.void
warning(Problem problem)
Constructor Detail
FailFastProblemReporter
public FailFastProblemReporter()
Method Detail
setLogger
public void setLogger(@Nullable Log logger)
Set thelogger
that is to be used to report warnings.If set to
null
then a defaultlogger
set to the name of the instance class will be used.- Parameters:
logger
- thelogger
that is to be used to report warnings
fatal
public void fatal(Problem problem)
Throws aBeanDefinitionParsingException
detailing the error that has occurred.- Specified by:
fatal
in interfaceProblemReporter
- Parameters:
problem
- the source of the error
error
public void error(Problem problem)
Throws aBeanDefinitionParsingException
detailing the error that has occurred.- Specified by:
error
in interfaceProblemReporter
- Parameters:
problem
- the source of the error
warning
public void warning(Problem problem)
- Specified by:
warning
in interfaceProblemReporter
- Parameters:
problem
- the source of the warning