public final class MessageFormatter extends 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| Modifier and Type | Field and Description |
|---|---|
static PropertyResourceBundle |
GENERAL_MESSAGE_BUNDLE
ResourceBundle providing templates for message bodies |
| Constructor and Description |
|---|
MessageFormatter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendErrorAsString(StringBuffer messageBuilder,
InputError error) |
static void |
appendSliceContext(StringBuffer messageBuilder,
FrozenSlice slice) |
static String |
formatErrorAsString(InputError error)
Creates a full diagnosis of the given error
|
static Element |
formatErrorAsXHTML(Document ownerDocument,
InputError error) |
static Element |
formatErrorAsXML(Document ownerDocument,
DOMOutputOptions options,
InputError error,
boolean fullDetails)
|
static Element |
formatErrorAsXML(Document ownerDocument,
InputError error,
boolean fullDetails)
|
static String |
formatErrorCodeName(ErrorCode errorCode) |
static String |
formatErrorGroup(ErrorGroup errorGroup) |
static String |
getErrorMessage(ErrorCode errorCode,
Object... arguments)
Constructs an error message for the given
ErrorCode and arguments. |
static String |
getErrorMessage(InputError error)
Constructs an error message for the given
InputError. |
public static final PropertyResourceBundle GENERAL_MESSAGE_BUNDLE
ResourceBundle providing templates for message bodiespublic static String getErrorMessage(InputError error)
InputError.public static String getErrorMessage(ErrorCode errorCode, Object... arguments)
ErrorCode and arguments.public static String formatErrorAsString(InputError error)
public static String formatErrorGroup(ErrorGroup errorGroup)
public static Element formatErrorAsXML(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.DOMExceptionpublic static Element formatErrorAsXML(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.DOMExceptionpublic static Element formatErrorAsXHTML(Document ownerDocument, InputError error)
public static void appendErrorAsString(StringBuffer messageBuilder, InputError error)
public static void appendSliceContext(StringBuffer messageBuilder, FrozenSlice slice)
Copyright © 2008–2026 The University of Edinburgh. All rights reserved.