Class BeanMisconfiguredXMLException

All Implemented Interfaces:
Serializable

public class BeanMisconfiguredXMLException extends AnchorCombinableException
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 Details

    • BeanMisconfiguredXMLException

      public BeanMisconfiguredXMLException(String msg, Throwable cause)
      Constructor
      Parameters:
      msg - the message we want to display to the user about the exception
      cause - what caused it
    • BeanMisconfiguredXMLException

      public BeanMisconfiguredXMLException(Throwable cause)
      Constructor
      Parameters:
      cause - what caused it
  • Method Details

    • canExceptionBeCombined

      protected boolean canExceptionBeCombined(Throwable exception)
      Description copied from class: AnchorCombinableException
      Can another exception be combined with this exception?
      Specified by:
      canExceptionBeCombined in class AnchorCombinableException
      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

      public Throwable summarize()
      This summarize() option just looks for the most deep exception that can be 'combined' and takes its message
      Specified by:
      summarize in class AnchorCombinableException
      Returns:
      an exception that summarizes this exception (and maybe some nested-exceptions)
    • canExceptionBeSkipped

      protected boolean canExceptionBeSkipped(Throwable exception)
      Description copied from class: AnchorCombinableException
      Can another exception be skipped, when we combine with the current exception?
      Specified by:
      canExceptionBeSkipped in class AnchorCombinableException
      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

      protected String createMessageForDescription(String description)
      Description copied from class: AnchorCombinableException
      Creates a message for the exception from the description.
      Specified by:
      createMessageForDescription in class AnchorCombinableException
      Parameters:
      description - either a single description, or a combined description
      Returns:
      a message describing an error, incorporating description