- All Implemented Interfaces:
Serializable
,Comparable<MessageDetails>
,Constable
,Function<Throwable,
String>
The
MessageDetails
enumeration provides different detail levels when
generating exception messages from Throwable
exceptions using the
Trap.toMessage(MessageDetails)
method. The MessageDetails
enumeration actually defines Function
methods for construction the
messages and the Trap.toMessage(MessageDetails)
method actually just
forwards its MessageDetails
argument (itself being a
Function
) to the Trap.toMessage(Function)
method.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAll messages including all (children's) causes (Throwable.getCause()
) together with all (children's) suppressed exceptions (Throwable.getSuppressed()
) are taken into account.All localized messages including all (children's) causes (Throwable.getCause()
) together with all (children's) suppressed exceptions (Throwable.getSuppressed()
) are taken into account.Same asThrowable.getMessage()
Same asThrowable.getLocalizedMessage()
Just the messages from the root causes (the roots ofThrowable.getCause()
) and root suppressed exceptions (the roots ofThrowable.getSuppressed()
) are taken into account.Just the localized messages from the root causes (the roots ofThrowable.getCause()
) and root suppressed exceptions (the roots ofThrowable.getSuppressed()
) are taken into account. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageDetails
Returns the enum constant of this class with the specified name.static MessageDetails[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PLAIN
Same asThrowable.getMessage()
-
PLAIN_LOCALIZED
Same asThrowable.getLocalizedMessage()
-
SHORT
Just the messages from the root causes (the roots ofThrowable.getCause()
) and root suppressed exceptions (the roots ofThrowable.getSuppressed()
) are taken into account. -
SHORT_LOCALIZED
Just the localized messages from the root causes (the roots ofThrowable.getCause()
) and root suppressed exceptions (the roots ofThrowable.getSuppressed()
) are taken into account. -
FULL
All messages including all (children's) causes (Throwable.getCause()
) together with all (children's) suppressed exceptions (Throwable.getSuppressed()
) are taken into account. -
FULL_LOCALIZED
All localized messages including all (children's) causes (Throwable.getCause()
) together with all (children's) suppressed exceptions (Throwable.getSuppressed()
) are taken into account.
-
-
Field Details
-
CAUSED_BY
- See Also:
-
ALSO_NOTABLE
- See Also:
-
POSSIBLE_CAUSE
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
apply
-