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
,ContentHandlerAlreadyRegisteredException
,InvalidCanonicalizerException
,InvalidKeyResolverException
,InvalidTransformException
,KeyResolverException
,ResourceResolverException
,StorageResolverException
,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.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, 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 String
getMsgID()
Method getMsgIDException
getOriginalException()
Method getOriginalExceptionvoid
printStackTrace()
Method printStackTraceString
toString()
-
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:
printStackTrace
in classThrowable
-
getOriginalException
public Exception getOriginalException()
Method getOriginalException- Returns:
- the original exception
-
-