public final class MessageFormatter
extends java.lang.Object
InputError in various ways.
NOTE: We're using MessageFormat extensively here, which hasn't been updated to use
StringBuilder so we'll sadly have to make do with StringBuffer| 限定符和类型 | 字段和说明 |
|---|---|
static java.util.PropertyResourceBundle |
GENERAL_MESSAGE_BUNDLE
ResourceBundle providing templates for message bodies |
| 构造器和说明 |
|---|
MessageFormatter() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
appendErrorAsString(java.lang.StringBuffer messageBuilder,
InputError error) |
static void |
appendSliceContext(java.lang.StringBuffer messageBuilder,
FrozenSlice slice) |
static java.lang.String |
formatErrorAsString(InputError error)
Creates a full diagnosis of the given error
|
static org.w3c.dom.Element |
formatErrorAsXHTML(org.w3c.dom.Document ownerDocument,
InputError error) |
static org.w3c.dom.Element |
formatErrorAsXML(org.w3c.dom.Document ownerDocument,
DOMOutputOptions options,
InputError error,
boolean fullDetails)
Creates a DOM
Element containing information about the given error, including
either just the ErrorCode or full details. |
static org.w3c.dom.Element |
formatErrorAsXML(org.w3c.dom.Document ownerDocument,
InputError error,
boolean fullDetails)
Creates a DOM
Element containing information about the given error, including
either just the ErrorCode or full details. |
static java.lang.String |
formatErrorCodeName(ErrorCode errorCode) |
static java.lang.String |
formatErrorGroup(ErrorGroup errorGroup) |
static java.lang.String |
getErrorMessage(ErrorCode errorCode,
java.lang.Object... arguments)
Constructs an error message for the given
ErrorCode and arguments. |
static java.lang.String |
getErrorMessage(InputError error)
Constructs an error message for the given
InputError. |
public static final java.util.PropertyResourceBundle GENERAL_MESSAGE_BUNDLE
ResourceBundle providing templates for message bodiespublic static java.lang.String getErrorMessage(InputError error)
InputError.public static java.lang.String getErrorMessage(ErrorCode errorCode, java.lang.Object... arguments)
ErrorCode and arguments.public static java.lang.String formatErrorAsString(InputError error)
public static java.lang.String formatErrorGroup(ErrorGroup errorGroup)
public static java.lang.String formatErrorCodeName(ErrorCode errorCode)
public static org.w3c.dom.Element formatErrorAsXML(org.w3c.dom.Document ownerDocument,
InputError error,
boolean fullDetails)
Element containing information about the given error, including
either just the ErrorCode or full details.
The error Element will have qualified name error and belong to the
SnuggleConstants.SNUGGLETEX_NAMESPACE namespace.
ownerDocument - Document that will contain the resulting element.error - InputError to formatfullDetails - false if you just want the error code, true for full details.org.w3c.dom.DOMExceptionpublic static org.w3c.dom.Element formatErrorAsXML(org.w3c.dom.Document ownerDocument,
DOMOutputOptions options,
InputError error,
boolean fullDetails)
Element containing information about the given error, including
either just the ErrorCode or full details.
The error Element will have the given qualified name and namespace as
determined by the DOMOutputOptions passed.
ownerDocument - Document that will contain the resulting element.error - InputError to formatfullDetails - false if you just want the error code, true for full details.org.w3c.dom.DOMExceptionpublic static org.w3c.dom.Element formatErrorAsXHTML(org.w3c.dom.Document ownerDocument,
InputError error)
public static void appendErrorAsString(java.lang.StringBuffer messageBuilder,
InputError error)
public static void appendSliceContext(java.lang.StringBuffer messageBuilder,
FrozenSlice slice)