Class SerializableErrorEntity


  • public class SerializableErrorEntity
    extends Object
    An entity that can be serialized in a WebCodeException.
    Author:
    Manuele Simi (ISTI CNR)
    • Field Detail

      • ENTITY_CHAR_SEPARATOR

        protected static final char ENTITY_CHAR_SEPARATOR
        See Also:
        Constant Field Values
    • Constructor Detail

      • SerializableErrorEntity

        public SerializableErrorEntity()
      • SerializableErrorEntity

        public SerializableErrorEntity​(ErrorCode errorCode)
        Parameters:
        errorCode - the errorc code to serialize
      • SerializableErrorEntity

        public SerializableErrorEntity​(Exception e)
        Parameters:
        e - the exception to serialize
      • SerializableErrorEntity

        public SerializableErrorEntity​(Exception e,
                                       int lines)
        Parameters:
        e - the exception to serialize
        lines - the number of lines in the stacktrace to serialize
    • Method Detail

      • getId

        public int getId()
      • getMessage

        public String getMessage()
      • getExceptionClass

        public String getExceptionClass()
        Returns:
        the full qualified name of the embedded Exception
      • getEncodedTrace

        public String getEncodedTrace()
        Returns:
        the encoded stacktrace
      • hasStackTrace

        public boolean hasStackTrace()
        Checks if a stacktrace is available.
        Returns:
        true if a stacktrace is serialized in the entity.
      • setMessage

        protected void setMessage​(String message)
        Sets the message.
        Parameters:
        message -
      • setExceptionClass

        protected void setExceptionClass​(String exceptionClass)
        Sets the exception class.
        Parameters:
        exceptionClass -
      • setEncodedTrace

        protected void setEncodedTrace​(String encodedTrace)
        Sets the enconded trace.
        Parameters:
        encodedTrace -