org.apache.xml.security.exceptions
Class XMLSecurityException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.apache.xml.security.exceptions.XMLSecurityException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AlgorithmAlreadyRegisteredException, Base64DecodingException, CanonicalizationException, ContentHandlerAlreadyRegisteredException, InvalidCanonicalizerException, InvalidKeyResolverException, InvalidTransformException, KeyResolverException, ResourceResolverException, StorageResolverException, TransformationException, XMLEncryptionException, 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
protected  java.lang.String msgID
          Field msgID
protected  java.lang.Exception originalException
          Field originalException
 
Constructor Summary
XMLSecurityException()
          Constructor XMLSecurityException
XMLSecurityException(java.lang.Exception _originalException)
          Constructor XMLSecurityException
XMLSecurityException(java.lang.String _msgID)
          Constructor XMLSecurityException
XMLSecurityException(java.lang.String _msgID, java.lang.Exception _originalException)
          Constructor XMLSecurityException
XMLSecurityException(java.lang.String _msgID, java.lang.Object[] exArgs)
          Constructor XMLSecurityException
XMLSecurityException(java.lang.String _msgID, java.lang.Object[] exArgs, java.lang.Exception _originalException)
          Constructor XMLSecurityException
 
Method Summary
 java.lang.String getMsgID()
          Method getMsgID
 java.lang.Exception getOriginalException()
          Method getOriginalException
 void printStackTrace()
          Method printStackTrace
 void printStackTrace(java.io.PrintStream printstream)
          Method printStackTrace
 void printStackTrace(java.io.PrintWriter printwriter)
          Method printStackTrace
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

originalException

protected java.lang.Exception originalException
Field originalException


msgID

protected java.lang.String msgID
Field msgID

Constructor Detail

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.String _msgID,
                            java.lang.Exception _originalException)
Constructor XMLSecurityException

Parameters:
_msgID -
_originalException -

XMLSecurityException

public XMLSecurityException(java.lang.String _msgID,
                            java.lang.Object[] exArgs,
                            java.lang.Exception _originalException)
Constructor XMLSecurityException

Parameters:
_msgID -
exArgs -
_originalException -
Method Detail

getMsgID

public java.lang.String getMsgID()
Method getMsgID

Returns:
the messageId

toString

public java.lang.String toString()

printStackTrace

public void printStackTrace()
Method printStackTrace


printStackTrace

public void printStackTrace(java.io.PrintWriter printwriter)
Method printStackTrace

Parameters:
printwriter -

printStackTrace

public void printStackTrace(java.io.PrintStream printstream)
Method printStackTrace

Parameters:
printstream -

getOriginalException

public java.lang.Exception getOriginalException()
Method getOriginalException

Returns:
the original exception