Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.security.exceptions

public Class XMLSecurityException

extends Exception
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolverException, com.sun.org.apache.xml.internal.security.keys.storage.StorageResolverException, com.sun.org.apache.xml.internal.security.parser.XMLParserException, com.sun.org.apache.xml.internal.security.signature.XMLSignatureException, com.sun.org.apache.xml.internal.security.transforms.InvalidTransformException, com.sun.org.apache.xml.internal.security.transforms.TransformationException, com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException, com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException, com.sun.org.apache.xml.internal.security.c14n.InvalidCanonicalizerException, com.sun.org.apache.xml.internal.security.exceptions.AlgorithmAlreadyRegisteredException, com.sun.org.apache.xml.internal.security.exceptions.Base64DecodingException
Imports
java.text.MessageFormat, com.sun.org.apache.xml.internal.security.utils.I18n

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);
}

Field Summary

Modifier and TypeField and Description
protected String
msgID

Field msgID

private static final long

Constructor Summary

AccessConstructor and Description
public
XMLSecurityException()

Constructor XMLSecurityException

public
XMLSecurityException(String msgID)

Constructor XMLSecurityException

public
XMLSecurityException(String msgID, Object[] exArgs)

Constructor XMLSecurityException

public
XMLSecurityException(Exception originalException)

Constructor XMLSecurityException

public
XMLSecurityException(Exception originalException, String msgID)

Constructor XMLSecurityException

public
XMLSecurityException(String msgID, Exception originalException)
Deprecated

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

Constructor XMLSecurityException

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

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the messageId
getMsgID
()

Method getMsgID

public Exception

Returns:

the original exception
getOriginalException
()

Method getOriginalException

public void
printStackTrace()

Overrides java.lang.Throwable.printStackTrace.

Method printStackTrace

public String
toString()

Overrides java.lang.Throwable.toString.

Returns a short description of this throwable.

Field Detail

msgIDback to summary
protected String msgID

Field msgID

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Constructor Detail

XMLSecurityExceptionback to summary
public XMLSecurityException()

Constructor XMLSecurityException

XMLSecurityExceptionback to summary
public XMLSecurityException(String msgID)

Constructor XMLSecurityException

XMLSecurityExceptionback to summary
public XMLSecurityException(String msgID, Object[] exArgs)

Constructor XMLSecurityException

XMLSecurityExceptionback to summary
public XMLSecurityException(Exception originalException)

Constructor XMLSecurityException

XMLSecurityExceptionback to summary
public XMLSecurityException(Exception originalException, String msgID)

Constructor XMLSecurityException

XMLSecurityExceptionback to summary
public XMLSecurityException(String msgID, Exception originalException)

Deprecated

Annotations
@Deprecated
XMLSecurityExceptionback to summary
public XMLSecurityException(Exception originalException, String msgID, Object[] exArgs)

Constructor XMLSecurityException

XMLSecurityExceptionback to summary
public XMLSecurityException(String msgID, Object[] exArgs, Exception originalException)

Deprecated

Annotations
@Deprecated

Method Detail

getMsgIDback to summary
public String getMsgID()

Method getMsgID

Returns:String

the messageId

getOriginalExceptionback to summary
public Exception getOriginalException()

Method getOriginalException

Returns:Exception

the original exception

printStackTraceback to summary
public void printStackTrace()

Overrides java.lang.Throwable.printStackTrace.

Method printStackTrace

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Throwable.toString.

Doc from java.lang.Throwable.toString.

Returns a short description of this throwable. The result is the concatenation of:

  • the name of the class of this object
  • ": " (a colon and a space)
  • the result of invoking this object's getLocalizedMessage method
If getLocalizedMessage returns null, then just the class name is returned.
Returns:String

a string representation of this throwable.

Annotations
@Override