Class XMLSecurityRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.docx4j.org.apache.xml.security.exceptions.XMLSecurityRuntimeException
All Implemented Interfaces:
java.io.Serializable

public class XMLSecurityRuntimeException
extends java.lang.RuntimeException
The mother of all runtime Exceptions in this bundle. It allows exceptions to have their messages translated to the different locales. The xmlsecurity_en.properties file contains this line:
 xml.WrongElement = Can't create a {0} from a {1} element
 
Usage in the Java source is:
 {
    Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };

    throw new XMLSecurityException("xml.WrongElement", exArgs);
 }
 
Additionally, if another Exception has been caught, we can supply it, too>
 try {
    ...
 } catch (Exception oldEx) {
    Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };

    throw new XMLSecurityException("xml.WrongElement", exArgs, oldEx);
 }
 
Author:
Christian Geuer-Pollmann
See Also:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.lang.String msgID
    Field msgID
  • Constructor Summary

    Constructors 
    Constructor Description
    XMLSecurityRuntimeException()
    Constructor XMLSecurityRuntimeException
    XMLSecurityRuntimeException​(java.lang.Exception originalException)
    Constructor XMLSecurityRuntimeException
    XMLSecurityRuntimeException​(java.lang.String msgID)
    Constructor XMLSecurityRuntimeException
    XMLSecurityRuntimeException​(java.lang.String msgID, java.lang.Exception originalException)
    Constructor XMLSecurityRuntimeException
    XMLSecurityRuntimeException​(java.lang.String msgID, java.lang.Object[] exArgs)
    Constructor XMLSecurityRuntimeException
    XMLSecurityRuntimeException​(java.lang.String msgID, java.lang.Object[] exArgs, java.lang.Exception originalException)
    Constructor XMLSecurityRuntimeException
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getMsgID()
    Method getMsgID
    java.lang.Exception getOriginalException()
    Method getOriginalException
    java.lang.String toString()  

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • msgID

      protected java.lang.String msgID
      Field msgID
  • Constructor Details

    • XMLSecurityRuntimeException

      public XMLSecurityRuntimeException()
      Constructor XMLSecurityRuntimeException
    • XMLSecurityRuntimeException

      public XMLSecurityRuntimeException​(java.lang.String msgID)
      Constructor XMLSecurityRuntimeException
      Parameters:
      msgID -
    • XMLSecurityRuntimeException

      public XMLSecurityRuntimeException​(java.lang.String msgID, java.lang.Object[] exArgs)
      Constructor XMLSecurityRuntimeException
      Parameters:
      msgID -
      exArgs -
    • XMLSecurityRuntimeException

      public XMLSecurityRuntimeException​(java.lang.Exception originalException)
      Constructor XMLSecurityRuntimeException
      Parameters:
      originalException -
    • XMLSecurityRuntimeException

      public XMLSecurityRuntimeException​(java.lang.String msgID, java.lang.Exception originalException)
      Constructor XMLSecurityRuntimeException
      Parameters:
      msgID -
      originalException -
    • XMLSecurityRuntimeException

      public XMLSecurityRuntimeException​(java.lang.String msgID, java.lang.Object[] exArgs, java.lang.Exception originalException)
      Constructor XMLSecurityRuntimeException
      Parameters:
      msgID -
      exArgs -
      originalException -
  • Method Details

    • getMsgID

      public java.lang.String getMsgID()
      Method getMsgID
      Returns:
      the messageId
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Throwable
    • getOriginalException

      public java.lang.Exception getOriginalException()
      Method getOriginalException
      Returns:
      the original exception