Class TileErrorHandler

java.lang.Object
org.apache.sis.internal.coverage.j2d.TileErrorHandler

public final class TileErrorHandler extends Object
A convenience class for reporting an error during computation of a tile.
Since:
1.1
Version:
1.1
Author:
Martin Desruisseaux (Geomatys)
  • Field Details

    • THROW

      public static final TileErrorHandler THROW
      Exceptions are wrapped in an ImagingOpException and thrown. In such case, no result is available. This is the default handler.
  • Constructor Details

    • TileErrorHandler

      public TileErrorHandler(ErrorHandler handler, Class<?> sourceClass, String sourceMethod)
      Creates a new tile error handler.
      Parameters:
      handler - where to report exceptions, or ErrorHandler.THROW for throwing them.
      sourceClass - the class to declare in LogRecord in an error occurred during calculation.
      sourceMethod - name of the method to declare in LogRecord in an error occurred during calculation.
  • Method Details

    • publish

      public void publish(ErrorHandler.Report report)
      If the given report is non-empty, sends it to the error handler. This method sets the logger, source class and source method name on the LogRecord instance before to publish it.
      Parameters:
      report - the error report to send if non-empty.