Class XMLSecurityRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.xml.security.exceptions.XMLSecurityRuntimeException
- All Implemented Interfaces:
Serializable
The mother of all runtime 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} 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, too>
try { ... } catch (Exception oldEx) { Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" }; throw new XMLSecurityException("xml.WrongElement", exArgs, oldEx); }
- Author:
- Christian Geuer-Pollmann
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor XMLSecurityRuntimeExceptionXMLSecurityRuntimeException
(Exception _originalException) Constructor XMLSecurityRuntimeExceptionXMLSecurityRuntimeException
(String _msgID) Constructor XMLSecurityRuntimeExceptionXMLSecurityRuntimeException
(String _msgID, Exception _originalException) Constructor XMLSecurityRuntimeExceptionXMLSecurityRuntimeException
(String _msgID, Object[] exArgs) Constructor XMLSecurityRuntimeExceptionXMLSecurityRuntimeException
(String _msgID, Object[] exArgs, Exception _originalException) Constructor XMLSecurityRuntimeException -
Method Summary
Modifier and TypeMethodDescriptiongetMsgID()
Method getMsgIDMethod getOriginalExceptionvoid
Method printStackTracevoid
printStackTrace
(PrintStream printstream) Method printStackTracevoid
printStackTrace
(PrintWriter printwriter) Method printStackTracetoString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
Field Details
-
originalException
Field originalException -
msgID
Field msgID
-
-
Constructor Details
-
XMLSecurityRuntimeException
public XMLSecurityRuntimeException()Constructor XMLSecurityRuntimeException -
XMLSecurityRuntimeException
Constructor XMLSecurityRuntimeException- Parameters:
_msgID
-
-
XMLSecurityRuntimeException
Constructor XMLSecurityRuntimeException- Parameters:
_msgID
-exArgs
-
-
XMLSecurityRuntimeException
Constructor XMLSecurityRuntimeException- Parameters:
_originalException
-
-
XMLSecurityRuntimeException
Constructor XMLSecurityRuntimeException- Parameters:
_msgID
-_originalException
-
-
XMLSecurityRuntimeException
Constructor XMLSecurityRuntimeException- Parameters:
_msgID
-exArgs
-_originalException
-
-
-
Method Details
-
getMsgID
Method getMsgID- Returns:
- the messageId
-
toString
-
printStackTrace
public void printStackTrace()Method printStackTrace- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
Method printStackTrace- Overrides:
printStackTrace
in classThrowable
- Parameters:
printwriter
-
-
printStackTrace
Method printStackTrace- Overrides:
printStackTrace
in classThrowable
- Parameters:
printstream
-
-
getOriginalException
Method getOriginalException- Returns:
- the original exception
-