@Role
public interface ErrorBlockGenerator
Modifier and Type | Field and Description |
---|---|
static String |
CLASS_ATTRIBUTE_DESCRIPTION_VALUE
The CSS class attribute value to use for the block displaying the description.
|
static String |
CLASS_ATTRIBUTE_MESSAGE_VALUE
The CSS class attribute value to use for the block displaying the message.
|
static String |
CLASS_ATTRIBUTE_NAME
The CSS class attribute name to use for the generated top level error block.
|
Modifier and Type | Method and Description |
---|---|
List<Block> |
generateErrorBlocks(String message,
String description,
boolean isInline)
Generates error blocks to render an error in a wiki page.
|
List<Block> |
generateErrorBlocks(String messagePrefix,
Throwable throwable,
boolean isInline)
Generates error blocks to render an error in a wiki page.
|
static final String CLASS_ATTRIBUTE_NAME
static final String CLASS_ATTRIBUTE_MESSAGE_VALUE
static final String CLASS_ATTRIBUTE_DESCRIPTION_VALUE
List<Block> generateErrorBlocks(String message, String description, boolean isInline)
message
- the short message that will be displayed to the userdescription
- the description that will be displayed to the user when he clicks on the messageisInline
- whether the generated blocks should be inline or notList<Block> generateErrorBlocks(String messagePrefix, Throwable throwable, boolean isInline)
messagePrefix
- the prefix of the short message that will be displayed to the user. This message will be
augmented with the root cause of the error extracted from the passed throwable and an
additional text inviting the user to click the message will be added to the message prefixthrowable
- the exception from which the description will be extracted fromisInline
- whether the generated blocks should be inline or notCopyright © 2004–2021 XWiki. All rights reserved.