org.apache.xml.security.exceptions
Class XMLSecurityException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by 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. 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
protected  String msgID
          Field msgID
 
Constructor Summary
XMLSecurityException()
          Constructor XMLSecurityException
XMLSecurityException(Exception originalException)
          Constructor XMLSecurityException
XMLSecurityException(String msgID)
          Constructor XMLSecurityException
XMLSecurityException(String msgID, Exception originalException)
          Constructor XMLSecurityException
XMLSecurityException(String msgID, Object... exArgs)
          Constructor XMLSecurityException
XMLSecurityException(String msgID, Object[] exArgs, Exception originalException)
          Constructor XMLSecurityException
 
Method Summary
 String getMsgID()
          Method getMsgID
 Exception getOriginalException()
          Method getOriginalException
 void printStackTrace()
          Method printStackTrace
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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(String msgID,
                            Exception originalException)
Constructor XMLSecurityException

Parameters:
msgID -
originalException -

XMLSecurityException

public XMLSecurityException(String msgID,
                            Object[] exArgs,
                            Exception originalException)
Constructor XMLSecurityException

Parameters:
msgID -
exArgs -
originalException -
Method Detail

getMsgID

public String getMsgID()
Method getMsgID

Returns:
the messageId

toString

public String toString()
Overrides:
toString in class Throwable

printStackTrace

public void printStackTrace()
Method printStackTrace

Overrides:
printStackTrace in class Throwable

getOriginalException

public Exception getOriginalException()
Method getOriginalException

Returns:
the original exception


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.