DefaultErrorHandlerpublic class DefaultErrorHandler extends Object implements com.sun.enterprise.deployment.annotation.ErrorHandlerDefault implementation of the ErrorHandler |
Fields Summary |
---|
Logger | logger |
Constructors Summary |
---|
public DefaultErrorHandler()Creates a new ErrorHandler with the default logger
logger = AnnotationUtils.getLogger();
| public DefaultErrorHandler(Logger logger)Creates a new ErrorHandler with the provided looger;
this.logger = logger;
|
Methods Summary |
---|
public void | error(com.sun.enterprise.deployment.annotation.AnnotationProcessorException ape)Receive notification of an error
AnnotationInfo info = ape.getLocator();
if (info==null){
logger.severe(ape.getMessage());
} else{
logger.severe(AnnotationUtils.getLocalString(
"enterprise.deployment.annotation.error",
"{2}\n symbol: {0} location: {1}\n\n",
new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()}));
}
| public void | fine(com.sun.enterprise.deployment.annotation.AnnotationProcessorException ape)Receive notication of a fine error message
if (logger.isLoggable(Level.FINE)){
AnnotationInfo info = ape.getLocator();
if (info==null){
logger.fine(ape.getMessage());
} else{
logger.fine(AnnotationUtils.getLocalString(
"enterprise.deployment.annotation.error",
"{2}\n symbol: {0}\n location: {1}\n\n",
new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()}));
}
}
| public void | warning(com.sun.enterprise.deployment.annotation.AnnotationProcessorException ape)Receive notification of a warning
if (logger.isLoggable(Level.WARNING)){
AnnotationInfo info = ape.getLocator();
if (info==null){
logger.warning(ape.getMessage());
} else{
logger.warning(AnnotationUtils.getLocalString(
"enterprise.deployment.annotation.error",
"{2}\n symbol: {0}\n location: {1}\n\n",
new Object[] { info.getElementType(), info.getAnnotatedElement(), ape.getMessage()}));
}
}
|
|