Class BeanMisconfiguredXMLException
Object
Throwable
Exception
AnchorCheckedException
AnchorCombinableException
BeanMisconfiguredXMLException
- All Implemented Interfaces:
Serializable
A bean's XML is thrown when a bean has misconfigured XML.
As these exceptions tend to get nested inside each other, we need to eventually combine them, so that only the final-most errored bean is displayed to the user.
- Author:
- Owen Feehan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBeanMisconfiguredXMLException
(String msg, Throwable cause) ConstructorConstructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canExceptionBeCombined
(Throwable exception) Can another exception be combined with this exception?protected boolean
canExceptionBeSkipped
(Throwable exception) Can another exception be skipped, when we combine with the current exception?protected String
createMessageForDescription
(String description) Creates a message for the exception from the description.This summarize() option just looks for the most deep exception that can be 'combined' and takes its messageMethods inherited from class org.anchoranalysis.core.exception.combinable.AnchorCombinableException
combineDescriptionsRecursively, findMostDeepCombinableException, getDescription, hasNoCombinableNestedExceptions
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BeanMisconfiguredXMLException
Constructor- Parameters:
msg
- the message we want to display to the user about the exceptioncause
- what caused it
-
BeanMisconfiguredXMLException
Constructor- Parameters:
cause
- what caused it
-
-
Method Details
-
canExceptionBeCombined
Description copied from class:AnchorCombinableException
Can another exception be combined with this exception?- Specified by:
canExceptionBeCombined
in classAnchorCombinableException
- Parameters:
exception
- the other exception to check if it can be combined.- Returns:
- true iff this exception is compatible to be combined with the current exception.
-
summarize
This summarize() option just looks for the most deep exception that can be 'combined' and takes its message- Specified by:
summarize
in classAnchorCombinableException
- Returns:
- an exception that summarizes this exception (and maybe some nested-exceptions)
-
canExceptionBeSkipped
Description copied from class:AnchorCombinableException
Can another exception be skipped, when we combine with the current exception?- Specified by:
canExceptionBeSkipped
in classAnchorCombinableException
- Parameters:
exception
- the other exception to check if it can be skipped.- Returns:
- true iff this exception is compatible to be skipped, when processing the current exception.
-
createMessageForDescription
Description copied from class:AnchorCombinableException
Creates a message for the exception from the description.- Specified by:
createMessageForDescription
in classAnchorCombinableException
- Parameters:
description
- either a single description, or a combined description- Returns:
- a message describing an error, incorporating description
-