Class ReportedException

    • Constructor Detail

      • ReportedException

        public ReportedException​(Throwable exception,
                                 Thread caughtOnThread)
        Constructs a new ReportedException.
        Parameters:
        exception - the cause (which is saved for later retrieval by the Throwable.getCause() method)
        caughtOnThread - thread where the exception was caught
        Since:
        14380
    • Method Detail

      • warn

        public void warn()
        Displays a warning for this exception. The program can then continue normally. Does not block.
      • startSection

        public void startSection​(String sectionName)
        Starts a new debug data section. This normally does not need to be called manually.
        Parameters:
        sectionName - The section name.
      • isSame

        public boolean isSame​(ReportedException e)
        Checks if this exception is considered the same as an other exception. This is the case if both have the same cause and message.
        Parameters:
        e - The exception to check against.
        Returns:
        true if they are considered the same.
      • put

        public ReportedException put​(String key,
                                     Object value)
        Adds some debug values to this exception. The value is converted to a string. Errors during conversion are handled.
        Parameters:
        key - The key to add this for. Does not need to be unique but it would be nice.
        value - The value.
        Returns:
        This exception for easy chaining.
      • put

        public ReportedException put​(String key,
                                     Supplier<Object> valueSupplier)
        Adds some debug values to this exception. This method automatically catches errors that occur during the production of the value.
        Parameters:
        key - The key to add this for. Does not need to be unique but it would be nice.
        valueSupplier - A supplier that is called once to get the value.
        Returns:
        This exception for easy chaining.
        Since:
        10586
      • mayHaveConcurrentSource

        public boolean mayHaveConcurrentSource()
        Check if this exception may be caused by a threading issue.
        Returns:
        true if it is.
        Since:
        10585
      • isOutOfMemory

        public boolean isOutOfMemory()
        Check if this is caused by an out of memory situation
        Returns:
        true if it is.
        Since:
        10819