Class TdomException

java.lang.Object
java.lang.Throwable
java.lang.Exception
eu.bandm.tools.tdom.runtime.TdomException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TdomAttributeException, TdomContentException, TdomXmlException

public abstract class TdomException extends Exception
Signals that, when initializing a model instance, a violation of the document type format occured, as it is defined by the DTD. Raised out of several runtime classes and from the code generated for the model elements' classes.
See Also:
  • Constructor Details

  • Method Details

    • setLocation

      public void setLocation(Locatable<?> loc)
    • setContext

      public void setContext(NamespaceName ns)
    • setContext

      public void setContext(TypedElement el)
    • setContextAndLocation

      public void setContextAndLocation(NamespaceName ns, Locatable<?> loc)
    • setContextAndLocation

      public void setContextAndLocation(TypedElement el, Locatable<?> loc)
    • getLocation

      @Opt public @Opt Location<?> getLocation()
    • getContextElementNSName

      @Opt public @Opt NamespaceName getContextElementNSName()
    • contextString

      protected String contextString()
    • extract

      @Opt public static @Opt TdomException extract(Throwable t)
      Follow the chain of ".cause" entries until an instance of this class is found. In many cases an instance of this class is wrapped in a Runtime Exception, or the tdom is called via reflection, thus wrapped in a InvocationTargetException, etc.
      Returns:
      first found instance of (a subclass of) this class, or null if no such is found in the chain of ".cause" fields.