Module org.apache.santuario.xmlsec
Class XMLSecurityException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.xml.security.exceptions.XMLSecurityException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AlgorithmAlreadyRegisteredException,Base64DecodingException,CanonicalizationException,InvalidCanonicalizerException,InvalidTransformException,ResourceResolverException,TransformationException,XMLEncryptionException,XMLSecurityConfigurationException,XMLSignatureException
public class XMLSecurityException extends Exception
The mother of all Exceptions in this bundle. It allows exceptions to have their messages translated to the different locales. Thexmlsecurity_en.propertiesfile contains this line:xml.WrongElement = Can't create a {0} from a {1} elementUsage 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, tootry { ... } catch (Exception oldEx) { Object[] exArgs = { Constants._TAG_TRANSFORMS, "BadElement" }; throw new XMLSecurityException("xml.WrongElement", exArgs, oldEx); }- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XMLSecurityException()Constructor XMLSecurityExceptionXMLSecurityException(Exception originalException)Constructor XMLSecurityExceptionXMLSecurityException(Exception originalException, String msgID)Constructor XMLSecurityExceptionXMLSecurityException(Exception originalException, String msgID, Object[] exArgs)Constructor XMLSecurityExceptionXMLSecurityException(String msgID)Constructor XMLSecurityExceptionXMLSecurityException(String msgID, Exception originalException)Deprecated.XMLSecurityException(String msgID, Object[] exArgs)Constructor XMLSecurityExceptionXMLSecurityException(String msgID, Object[] exArgs, Exception originalException)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMsgID()Method getMsgIDExceptiongetOriginalException()Method getOriginalExceptionvoidprintStackTrace()Method printStackTraceStringtoString()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Field Detail
-
msgID
protected String msgID
Field msgID
-
-
Constructor Detail
-
XMLSecurityException
public XMLSecurityException()
Constructor XMLSecurityException
-
XMLSecurityException
public XMLSecurityException(String msgID)
Constructor XMLSecurityException- Parameters:
msgID-
-
XMLSecurityException
public XMLSecurityException(String msgID, Object[] exArgs)
Constructor XMLSecurityException- Parameters:
msgID-exArgs-
-
XMLSecurityException
public XMLSecurityException(Exception originalException)
Constructor XMLSecurityException- Parameters:
originalException-
-
XMLSecurityException
public XMLSecurityException(Exception originalException, String msgID)
Constructor XMLSecurityException- Parameters:
msgID-originalException-
-
XMLSecurityException
@Deprecated public XMLSecurityException(String msgID, Exception originalException)
Deprecated.
-
XMLSecurityException
public XMLSecurityException(Exception originalException, String msgID, Object[] exArgs)
Constructor XMLSecurityException- Parameters:
msgID-exArgs-originalException-
-
XMLSecurityException
@Deprecated public XMLSecurityException(String msgID, Object[] exArgs, Exception originalException)
Deprecated.
-
-
Method Detail
-
getMsgID
public String getMsgID()
Method getMsgID- Returns:
- the messageId
-
printStackTrace
public void printStackTrace()
Method printStackTrace- Overrides:
printStackTracein classThrowable
-
getOriginalException
public Exception getOriginalException()
Method getOriginalException- Returns:
- the original exception
-
-