public class PolicyEvaluationException extends PolicyException
PolicyEvaluationException
is the exception
for the error happening in policy request XML parsing and policy
request evaluation.CONDITION_COLLECTION, ORGANIZATION, POLICY, REFERRAL_COLLECTION, REFERRAL_TYPE, RESPONSE_PROVIDER_COLLECTION, RULE, SERVICE, SUBJECT_TYPE, USER_COLLECTION
Constructor and Description |
---|
PolicyEvaluationException(String message)
Constructs an instance of the
PolicyEvaluationException . |
PolicyEvaluationException(String message,
String reqId)
Constructs an instance of the
PolicyEvaluationException
class. |
PolicyEvaluationException(String rbName,
String errorCode,
Object[] args,
Throwable nestedException)
Constructs an instance of
PolicyEvaluationException
to pass the localized error message
At this level, the locale of the caller is not known and it is
not possible to throw localized error message at this level. |
PolicyEvaluationException(String rbName,
String errorCode,
Object[] args,
Throwable nestedException,
String reqId)
Constructs an instance of
PolicyEvaluationException
to pass the localized error message
At this level, the locale of the caller is not known and it is
not possible to throw localized error message at this level. |
PolicyEvaluationException(String message,
Throwable nestedException)
Constructs an instance of the
PolicyEvaluationException
class. |
PolicyEvaluationException(String message,
Throwable nestedException,
String reqId)
Constructs an instance of the
PolicyEvaluationException
class. |
PolicyEvaluationException(Throwable nestedException)
Constructs an instance of the
PolicyEvaluationException |
PolicyEvaluationException(Throwable nestedException,
String reqId)
Constructs an instance of the
PolicyEvaluationException
class. |
Modifier and Type | Method and Description |
---|---|
String |
getCompleteL10NMessage(Locale locale) |
String |
getErrorCode()
Use this method to chain this exception with another to get localized
error messge use getL10NMessage method
|
String |
getL10NMessage(Locale locale)
Use this method to get localized error message directly.
|
String |
getMessage()
Gets messages of the exceptions including the chained exceptions
|
Object[] |
getMessageArgs()
Use this method to chain this exception with another to get localized
error messge use getL10NMessage method
|
Throwable |
getNestedException() |
String |
getRequestId()
Returns the request Id.
|
String |
getResourceBundleName()
Use this method to chain this exception with another to get localized
error messge use getL10NMessage method
|
void |
printStackTrace()
Prints the stack trace of the root exception to standard error
stream.
|
void |
printStackTrace(PrintStream ps)
Prints the stack trace of the root exception to a PrintStream
Also prints the messages of all the exceptions starting from top
exception to the root exception, at the top of stack trace
|
void |
printStackTrace(PrintWriter pw)
Prints the stack trace of the root exception to a PrintWriter
Also prints the messages of all the exceptions starting from top
exception to the root exception, at the top of stack trace
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public PolicyEvaluationException(String message)
PolicyEvaluationException
.message
- The message provided by the object that is throwing the
exception.public PolicyEvaluationException(Throwable nestedException)
PolicyEvaluationException
nestedException
- the exception caught by the code block creating
this.public PolicyEvaluationException(Throwable nestedException, String reqId)
PolicyEvaluationException
class.nestedException
- the exception caught by the code block creating
thisreqId
- The id of the policy request exception.public PolicyEvaluationException(String rbName, String errorCode, Object[] args, Throwable nestedException, String reqId)
PolicyEvaluationException
to pass the localized error message
At this level, the locale of the caller is not known and it is
not possible to throw localized error message at this level.
Instead this constructor provides Resource Bundle name and error code
for correctly locating the error message. The default
getMessage()
will always return English messages only. This
is in consistent with current JRE.rbName
- Resource Bundle Name to be used for getting
localized error message.errorCode
- Key to resource bundle. You can use
ResourceBundle rb = ResourceBunde.getBundle (rbName,locale); String localizedStr = rb.getString(errorCode);
args
- arguments to message. If it is not present pass the
as nullnestedException
- the exception caught by the code block creating
thisreqId
- The id of the policy request exception.public PolicyEvaluationException(String rbName, String errorCode, Object[] args, Throwable nestedException)
PolicyEvaluationException
to pass the localized error message
At this level, the locale of the caller is not known and it is
not possible to throw localized error message at this level.
Instead this constructor provides Resource Bundle name and error code
for correctly locating the error message. The default
getMessage()
will always return English messages only.
This is in consistent with current JRE.rbName
- Resource Bundle Name to be used for getting
localized error message.errorCode
- Key to resource bundle. You can use
ResourceBundle rb = ResourceBunde.getBundle (rbName,locale); String localizedStr = rb.getString(errorCode):
args
- arguments to message. If it is not present pass the
as nullnestedException
- the exception caught by the code block creating
thispublic PolicyEvaluationException(String message, String reqId)
PolicyEvaluationException
class.message
- The message provided by the object that is throwing the
exception.reqId
- The id of the policy request exception.public PolicyEvaluationException(String message, Throwable nestedException)
PolicyEvaluationException
class.message
- message of this exceptionnestedException
- the exception caught by the code block creating
this exception.public PolicyEvaluationException(String message, Throwable nestedException, String reqId)
PolicyEvaluationException
class.message
- message of this exceptionnestedException
- the exception caught by the code
block creating this exceptionreqId
- The id of the policy requestpublic String getRequestId()
public String getL10NMessage(Locale locale)
L10NMessage
getL10NMessage
in interface L10NMessage
locale
- Locale
to be used.ChainedException(String, String, Object[], Throwable)
public String getCompleteL10NMessage(Locale locale)
locale
- Locale
to be used.ChainedException(String, String, Object[], Throwable)
public String getResourceBundleName()
L10NMessage
getResourceBundleName
in interface L10NMessage
ChainedException(String, String, Object[], Throwable)
,
- to get localized error message.
public String getErrorCode()
L10NMessage
getErrorCode
in interface L10NMessage
ChainedException(String, String, Object[], Throwable)
,
- to get localized error message.
public Object[] getMessageArgs()
L10NMessage
getMessageArgs
in interface L10NMessage
MessageFormat
class to format the message
It can be null.ChainedException(String, String, Object[], Throwable)
,
- to get localized error message.
public String getMessage()
getMessage
in interface L10NMessage
getMessage
in class Throwable
public void printStackTrace()
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter pw)
printStackTrace
in class Throwable
pw
- PrintWriter to which to print the stack tracepublic void printStackTrace(PrintStream ps)
printStackTrace
in class Throwable
ps
- PrintStream to which to print the stack tracepublic Throwable getNestedException()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.