Class ErrorBean


  • public class ErrorBean
    extends Object
    An immutable bean that is used to hold error messages logged when modelstore catches (and represses) exceptions.
    • Field Detail

      • date

        private final Date date
      • message

        private final String message
      • fileOrStream

        private final String fileOrStream
      • exception

        private final Exception exception
    • Constructor Detail

      • ErrorBean

        public ErrorBean​(Date date,
                         String message,
                         Object fileOrStream,
                         Exception exception)
        Create an ErrorBean instances.
        Parameters:
        date - the date and time when the error occurred, with millisecond accuracy
        message - a human readable message describing where in the code the exception occurred
        fileOrStream - a string description of the File or InputStream/OutputStream object involved, or null if no such object was involved
        exception - the caught exception causing this error to be logged
    • Method Detail

      • getDate

        public Date getDate()
        Error time stamp
        Returns:
        a Date object describing a date and time with millisecond accuracy
      • getMessage

        public String getMessage()
        Human readable error message
        Returns:
        a String describing the error message
      • getFileOrStream

        public String getFileOrStream()
        The File or InputStream/OutputStream object involved in the error.
        Returns:
        a String description of the file/stream object involved in the error, or null if none are involved
      • getException

        public Exception getException()
        The exception that was caught and caused the error to be logged.
        Returns:
        an Exception object