Class XMLSecurityException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.docx4j.org.apache.xml.security.exceptions.XMLSecurityException
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AlgorithmAlreadyRegisteredException,Base64DecodingException,CanonicalizationException,InvalidCanonicalizerException,InvalidTransformException,TransformationException,XMLSignatureException
public class XMLSecurityException
extends java.lang.Exception
The mother of all 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.StringmsgIDField msgID -
Constructor Summary
Constructors Constructor Description XMLSecurityException()Constructor XMLSecurityExceptionXMLSecurityException(java.lang.Exception originalException)Constructor XMLSecurityExceptionXMLSecurityException(java.lang.Exception originalException, java.lang.String msgID)Constructor XMLSecurityExceptionXMLSecurityException(java.lang.Exception originalException, java.lang.String msgID, java.lang.Object[] exArgs)Constructor XMLSecurityExceptionXMLSecurityException(java.lang.String msgID)Constructor XMLSecurityExceptionXMLSecurityException(java.lang.String msgID, java.lang.Object[] exArgs)Constructor XMLSecurityException -
Method Summary
Modifier and Type Method Description java.lang.StringgetMsgID()Method getMsgIDjava.lang.ExceptiongetOriginalException()Method getOriginalExceptionvoidprintStackTrace()Method printStackTracejava.lang.StringtoString()
-
Field Details
-
msgID
protected java.lang.String msgIDField msgID
-
-
Constructor Details
-
XMLSecurityException
public XMLSecurityException()Constructor XMLSecurityException -
XMLSecurityException
public XMLSecurityException(java.lang.String msgID)Constructor XMLSecurityException- Parameters:
msgID-
-
XMLSecurityException
public XMLSecurityException(java.lang.String msgID, java.lang.Object[] exArgs)Constructor XMLSecurityException- Parameters:
msgID-exArgs-
-
XMLSecurityException
public XMLSecurityException(java.lang.Exception originalException)Constructor XMLSecurityException- Parameters:
originalException-
-
XMLSecurityException
public XMLSecurityException(java.lang.Exception originalException, java.lang.String msgID)Constructor XMLSecurityException- Parameters:
msgID-originalException-
-
XMLSecurityException
public XMLSecurityException(java.lang.Exception originalException, java.lang.String msgID, java.lang.Object[] exArgs)Constructor XMLSecurityException- Parameters:
msgID-exArgs-originalException-
-
-
Method Details
-
getMsgID
public java.lang.String getMsgID()Method getMsgID- Returns:
- the messageId
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Throwable
-
printStackTrace
public void printStackTrace()Method printStackTrace- Overrides:
printStackTracein classjava.lang.Throwable
-
getOriginalException
public java.lang.Exception getOriginalException()Method getOriginalException- Returns:
- the original exception
-