Interface IError

    • Method Detail

      • getErrorDateTime

        @Nullable
        default LocalDateTime getErrorDateTime()
        Returns:
        The date and time when the error occurred. Defaults to null for backwards compatibility.
        Since:
        10.1.7
      • hasErrorDateTime

        default boolean hasErrorDateTime()
        Check if a error date time is present.
        Returns:
        true if error date time information is present, false otherwise.
        Since:
        10.1.7
        See Also:
        getErrorDateTime()
      • hasErrorLocation

        default boolean hasErrorLocation()
        Check if a reasonable error location is present.
        Returns:
        true if location information is present, false otherwise.
        See Also:
        getErrorLocation()
      • getErrorText

        @Nullable
        default String getErrorText​(@Nonnull
                                    Locale aContentLocale)
        Get the error message of this error.
        Parameters:
        aContentLocale - The locale to be used in case the error text is available in multiple languages.
        Returns:
        The message of this form error. May be null in case no error text is available or if the passed Locale is not supported.
        See Also:
        getErrorTexts()
      • hasLinkedException

        default boolean hasLinkedException()
        Returns:
        true if a linked exception is present, false if not.
        See Also:
        getLinkedException()
      • getLinkedExceptionMessage

        @Nullable
        default String getLinkedExceptionMessage()
        Returns:
        The message of the linked exception or null if no such exception is available.
        See Also:
        getLinkedException()
      • getLinkedExceptionCause

        @Nullable
        default Throwable getLinkedExceptionCause()
        Returns:
        The cause of the linked exception or null if no such exception is available.
        See Also:
        getLinkedException()
      • getAsString

        @Nonnull
        @Nonempty
        default String getAsString​(@Nonnull
                                   Locale aContentLocale)
        Get the error as a string representation, including error ID, error location, error text and the linked exception.
        Parameters:
        aContentLocale - Locale to resolve the error text
        Returns:
        The default string representation