Class FeatureError

  • All Implemented Interfaces:
    com.opencloud.util.FastSerializable, java.io.Serializable

    public final class FeatureError
    extends java.lang.Object
    implements java.io.Serializable, com.opencloud.util.FastSerializable
    Represents an error that occurred in the Feature
    See Also:
    Serialized Form
    • Constructor Detail

      • FeatureError

        public FeatureError​(FeatureError.Cause cause)
        Create a feature error with an associated cause
        Parameters:
        cause - the cause of the error
      • FeatureError

        public FeatureError​(FeatureError.Cause cause,
                            java.lang.String explanation)
        Create a feature error with an associated cause and explanation
        Parameters:
        cause - the cause of the error
        explanation - description of the error
      • FeatureError

        public FeatureError​(FeatureError.Cause cause,
                            java.lang.String explanation,
                            java.lang.Throwable associatedThrowable)
        Create a feature error with an associated cause, an explanation and an associated exception
        Parameters:
        cause - the cause of the error
        explanation - description of the error
        associatedThrowable - an exception related to the error
      • FeatureError

        public FeatureError​(java.io.DataInput in)
                     throws java.io.IOException
        Deserialise a FastSerialized FeatureWarning. FastSerialize on this class does not store the associated throwable
        Parameters:
        in - input stream.
        Throws:
        java.io.IOException
    • Method Detail

      • hasExplanation

        public boolean hasExplanation()
        Returns:
        true if there is an explanation
      • getExplanation

        public java.lang.String getExplanation()
        Returns:
        the explanation
      • hasAssociatedThrowableStacktrace

        public boolean hasAssociatedThrowableStacktrace()
        Returns:
        true if there was a throwable associated with the error
      • getAssociatedThrowableStacktrace

        public java.lang.String getAssociatedThrowableStacktrace()
        Returns:
        a string representation of the stack trace of the throwable associated with the error
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStream

        public void toStream​(java.io.DataOutput stream)
                      throws java.io.IOException
        Specified by:
        toStream in interface com.opencloud.util.FastSerializable
        Throws:
        java.io.IOException