Interface ILcdS57InvalidCellExceptionHandler


public interface ILcdS57InvalidCellExceptionHandler
A handler for exceptions during the decoding of an S-57 cell.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    handleCellWarnings(String aCellSourceName, Collection<Exception> aWarnings)
    This method is called whenever warnings are raised during decoding of an individual cell.
    void
    handleInvalidCellException(String aCellSourceName, IOException aException)
    This method is called whenever an exception is raised during the decoding of an individual cell.
  • Method Details

    • handleInvalidCellException

      void handleInvalidCellException(String aCellSourceName, IOException aException) throws IOException
      This method is called whenever an exception is raised during the decoding of an individual cell. Two kind of exceptions can occur:
      • an exception thrown by the TLcdS57ModelDecoder that is set on this catalogue decoder, in which case no model is available.
      • a CRC checksum exception, thrown by this catalogue decoder. If no exception is thrown back by this method, the decoded model will be added to the model list, otherwise it will be discarded.
      When the IgnoreInvalidCells flag is set on the TLcdS57ModelDecoder, an exception raised in this method will be caught in the catalogue model decoder and it will try to decode as much cells as possible, if not, the exception is not caught and the decoding process will be interrupted.
      Parameters:
      aCellSourceName - the source name of the cell that could not be decoded.
      aException - the exception that was thrown during the decoding of the cell.
      Throws:
      IOException - if the exception that occurred in the cell is severe enough to inform (and possibly interrupt, depending on the ignoreInvalidCells flag) the catalogue model decoder.
      See Also:
    • handleCellWarnings

      default void handleCellWarnings(String aCellSourceName, Collection<Exception> aWarnings) throws IOException
      This method is called whenever warnings are raised during decoding of an individual cell. Typically, these are S-63 cell permit expiry warnings (SSE_015 or SSE_020).

      Be default, this method logs a warning message.

      Parameters:
      aCellSourceName - the source name of the cell that triggered the warnings.
      aWarnings - the warning exceptions.
      Throws:
      IOException - if the warnings that occurred in the cell are severe enough to inform (and possibly interrupt, depending on the ignoreInvalidCells flag) the catalogue model decoder.
      Since:
      2017.0
      See Also: