org.apache.woden.internal
Class ErrorReporterImpl
java.lang.Object
org.apache.woden.internal.ErrorReporterImpl
- All Implemented Interfaces:
- ErrorReporter
public class ErrorReporterImpl
- extends java.lang.Object
- implements ErrorReporter
This class reports errors that occur while parsing, validating or
manipulating WSDL descriptions, such as XML parser errors or violations
of the rules defined in the WSDL specification. That is, errors that
relate specifically to the WSDL. It does not report system runtime
or configuration errors, which are instead treated as exceptions.
There are four ways to report an error:
An error id and an array of message arguments are used to produce
a formatted error message from some parameterized message text.
The error may be reported with an target exception or without one.
An error id is specified with some ready-formatted message text.
The error may be reported with an target exception or without one.
The error is handled according to the severity level
(warning, error or fatal error) reported with the error.
The error reporter supports the 'en' (English) locale by default
and has a default error handler (i.e. a default implementation of
ErrorHandler). However, a different locale may be configured
via setLocale and a custom error handler implementation
may be configured as a system property.
- Author:
- John Kaputin (jkaputin@apache.org)
|
Method Summary |
ErrorHandler |
getErrorHandler()
|
java.lang.String |
getFormattedMessage(java.lang.String key,
java.lang.Object[] arguments)
|
java.util.Locale |
getLocale()
|
void |
reportError(ErrorLocator errLoc,
java.lang.String errorId,
java.lang.Object[] arguments,
short severity)
|
void |
reportError(ErrorLocator errLoc,
java.lang.String errorId,
java.lang.Object[] arguments,
short severity,
java.lang.Exception exception)
|
void |
reportError(ErrorLocator errLoc,
java.lang.String errorId,
java.lang.String message,
short severity)
|
void |
reportError(ErrorLocator errLoc,
java.lang.String errorId,
java.lang.String message,
short severity,
java.lang.Exception exception)
|
void |
setErrorHandler(ErrorHandler errorHandler)
|
void |
setLocale(java.util.Locale locale)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCALE_LANGUAGE
protected static final java.lang.String LOCALE_LANGUAGE
- See Also:
- Constant Field Values
ERROR_HANDLER_NAME
protected static final java.lang.String ERROR_HANDLER_NAME
- See Also:
- Constant Field Values
CONTINUE_AFTER_FATAL_ERROR
protected static final java.lang.String CONTINUE_AFTER_FATAL_ERROR
- See Also:
- Constant Field Values
ErrorReporterImpl
public ErrorReporterImpl()
throws WSDLException
- Throws:
WSDLException
reportError
public void reportError(ErrorLocator errLoc,
java.lang.String errorId,
java.lang.Object[] arguments,
short severity)
throws WSDLException
- Specified by:
reportError in interface ErrorReporter
- Throws:
WSDLException
reportError
public void reportError(ErrorLocator errLoc,
java.lang.String errorId,
java.lang.Object[] arguments,
short severity,
java.lang.Exception exception)
throws WSDLException
- Specified by:
reportError in interface ErrorReporter
- Throws:
WSDLException
reportError
public void reportError(ErrorLocator errLoc,
java.lang.String errorId,
java.lang.String message,
short severity)
throws WSDLException
- Specified by:
reportError in interface ErrorReporter
- Throws:
WSDLException
reportError
public void reportError(ErrorLocator errLoc,
java.lang.String errorId,
java.lang.String message,
short severity,
java.lang.Exception exception)
throws WSDLException
- Specified by:
reportError in interface ErrorReporter
- Throws:
WSDLException
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
- Specified by:
setErrorHandler in interface ErrorReporter
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandler in interface ErrorReporter
setLocale
public void setLocale(java.util.Locale locale)
- Specified by:
setLocale in interface ErrorReporter
getLocale
public java.util.Locale getLocale()
- Specified by:
getLocale in interface ErrorReporter
getFormattedMessage
public java.lang.String getFormattedMessage(java.lang.String key,
java.lang.Object[] arguments)
- Specified by:
getFormattedMessage in interface ErrorReporter
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.