com.crystaldecisions.sdk.exception
Class SDKRuntimeException

java.lang.Object
  extended by CERuntimeException
      extended by com.crystaldecisions.sdk.exception.SDKRuntimeException
Direct Known Subclasses:
SDKRuntimeException.ContradictingValues, SDKRuntimeException.DeprecatedMethodAccessed, SDKRuntimeException.InvalidOperation, SDKRuntimeException.ObjectNotFound, SDKRuntimeException.OutOfRange, SDKRuntimeException.PropertyNotFound, SDKRuntimeException.PublicationDocumentNotFound, SDKRuntimeException.SetInherited, SDKRuntimeException.UndefinedValue, SDKRuntimeException.Unexpected, SDKRuntimeException.UnexpectedCause, SDKRuntimeException.UnexpectedValue

public class SDKRuntimeException
extends CERuntimeException

This class defines runtime exceptions that the SDK may throw.


Nested Class Summary
static class SDKRuntimeException.ContradictingValues
           This exception is thrown when two values in the InfoObject have contradicting values.
static class SDKRuntimeException.DeprecatedMethodAccessed
           This exception is thrown when a deprecated method is accessed.
static class SDKRuntimeException.InvalidOperation
           This exception is thrown when an invalid operation is encountered.
static class SDKRuntimeException.ObjectNotFound
           This exception is thrown when an unknown object ID is encountered.
static class SDKRuntimeException.OutOfRange
           This exception is thrown when an input value is out of the expected range
static class SDKRuntimeException.PropertyNotFound
           This exception is thrown when an unknown property ID is encountered.
static class SDKRuntimeException.PublicationDocumentNotFound
           This exception is thrown when a source document of a publication cannot be found.
static class SDKRuntimeException.SetInherited
           This exception is thrown when an exception is encountered that results from the SetInherited class.
static class SDKRuntimeException.UndefinedValue
           This exception is thrown when an unexpected value is encountered.
static class SDKRuntimeException.Unexpected
           This exception describes an unexpected runtime problem.
static class SDKRuntimeException.UnexpectedCause
           This exception describes an unexpected runtime problem that is caused by some other exception.
static class SDKRuntimeException.UnexpectedValue
           This exception is thrown when an unexpected value is encountered.
 
Method Summary
static void checkPositive(java.lang.Integer propId, int value)
           Determines whether the unexpected value is positive.
static void checkRange(java.lang.Integer propId, double value, double lowerbound, double upperbound)
           Determines whether the value is out of range.
static void checkRange(java.lang.Integer propId, int value, int lowerbound, int upperbound)
           Determines whether the value is out of range.
 java.lang.String getDetail()
          Deprecated. Use #getDetailMessage()
 java.lang.String getDetailMessage(java.util.Locale locale)
           Gets the detailed error message used for diagnosis.
 java.lang.String[] getParams()
           Returns a String array that contains the parameters of this runtime exception.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkPositive

public static void checkPositive(java.lang.Integer propId,
                                 int value)

Determines whether the unexpected value is positive.

Parameters:
propId - An Integer that represents the property ID.
value - An int that represents the value.

getParams

public java.lang.String[] getParams()

Returns a String array that contains the parameters of this runtime exception.

Returns:
A String array that contains the parameters of this runtime exception.

checkRange

public static void checkRange(java.lang.Integer propId,
                              double value,
                              double lowerbound,
                              double upperbound)

Determines whether the value is out of range.

Parameters:
propId - An Integer that represents the property ID.
value - A double that represents the value.
lowerbound - A double that represents the lower bound.
upperbound - A double that represents the upper bound.

checkRange

public static void checkRange(java.lang.Integer propId,
                              int value,
                              int lowerbound,
                              int upperbound)

Determines whether the value is out of range.

Parameters:
propId - An Integer that represents the property ID.
value - An int that represents the value.
lowerbound - An int that represents the lower bound.
upperbound - An int that represents the upper bound.

getDetail

public java.lang.String getDetail()
Deprecated. Use #getDetailMessage()

Gets the detailed error message used for diagnosis. The string will contain the stack trace, and nested exceptions if applicable. This string is returned in its default locale.

Returns:
The detail string.

getDetailMessage

public java.lang.String getDetailMessage(java.util.Locale locale)

Gets the detailed error message used for diagnosis. The string will contain the stack trace, and nested exceptions if applicable. This string is returned in its requested locale.

Parameters:
locale - The requested locale of the message
Returns:
The detail string.