|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.iquery.IQueryServicesException
public class IQueryServicesException
Originally based on LocalizableException.
Constructor Summary | |
---|---|
IQueryServicesException(java.lang.String message)
Create an IQueryServicesException with a (non localized) message. |
|
IQueryServicesException(java.lang.String message,
java.lang.Throwable cause)
Create an IQueryServicesException with a (non localized) message and a cause. |
Method Summary | |
---|---|
Reason |
getFirstReason()
Deprecated. deprecated in 9.3, to be removed in 9.4. Providing a getFirstReason() method is inappropriate to this API. If
the caller desires to get the first reason, this should be done in the
caller code, as in:
This can be shortened as follows:
|
java.util.List<Reason> |
getReasons()
Returns the List of Reason objects associated with this exception. |
java.lang.String |
getSASLog()
get the SAS log specifically set for this exception. |
java.lang.String |
getSASLog(boolean searchCauses,
boolean combineLogs)
Returns the SAS Log for this exception (if one available). |
boolean |
hasReasonWithCodes(int reasonCode,
int subreasonCode)
Returns whether any Reason object set on this exception contains the given reason/subreason pair of values. |
Constructor Detail |
---|
public IQueryServicesException(java.lang.String message)
It is generally better to create an IQueryServicesException with a
localized message, using the constructor
IQueryServicesException(MessageFormatter message)
.
message
- the (non localized) messageIQueryServicesException(MessageFormatter message)
public IQueryServicesException(java.lang.String message, java.lang.Throwable cause)
It is generally better to create an IQueryServicesException with a
localized message, using the constructor
IQueryServicesException(String message, Throwable cause)
.
message
- the (non localized) messagecause
- the cause (which is saved for later retrieval by the
Throwable.getCause()
method). A null
value is permitted
and indicates that the cause is nonexistent or unknown.IQueryServicesException(MessageFormatter message)
Method Detail |
---|
public java.util.List<Reason> getReasons()
@Deprecated public Reason getFirstReason()
getFirstReason()
method is inappropriate to this API. If
the caller desires to get the first reason, this should be done in the
caller code, as in:
IQueryServericsException e = x ; // some IQ exception
Reason reason = null;
if ( !e.getReasons().isEmpty()) {
reason = e.getReason(1); // get first reason
}
if (reason != null) {
// do something with reason
}
This can be shortened as follows:
IQueryServericsException e = x ; // some IQ exception
Reason reason = (!e.getReasons().empty ? e.getReasons.get(0) : null);
public boolean hasReasonWithCodes(int reasonCode, int subreasonCode)
reasonCode
- The integer value of reason.subreasonCode
- The integer value of subreason.
public java.lang.String getSASLog()
public java.lang.String getSASLog(boolean searchCauses, boolean combineLogs)
searchCauses
is true
then it will return
the SAS Log found on the deepest chained/causing exception related to
this one. If combineLogs
is true
and
searchCauses
is true
then all of the logs
from the exception chain are combined into one string.
searchCauses
- combineLogs
- searchCauses
)
|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |