When decoding individual cells (.000 files) directly, you will get exceptions during decode() directly, indicating the problem.

When decoding catalogs, you can configure how errors for individual cells are handled through setIgnoreInvalidCells and setInvalidCellExceptionHandler on the TLcdS57UnifiedModelDecoder and TLcdS63UnifiedModelDecoder.

  • If your exception handler swallows the exception, the cell is ignored and decoding of other cells continues.

  • If your exception handler re-throws the exception and ignore invalid cells is set, the cell is ignored and decoding of other cells continues.

  • If your exception handler re-throws the exception and ignore invalid cells is not set, decoding is interrupted and the exception is passed to the caller.

Possible errors include:

  • Cells listed in the catalog for which data files are absent: you can expect a FileNotFoundException as error.

  • Corrupt cells: you can expect a TLcdS57InvalidChecksumException.

By default, ignore invalid cells is set to false, and the exception handler logs and re-throws all exceptions, except for missing cell files: these are simply logged and ignored.

Since cells in a catalog are lazy-loaded, exceptions can occur not only during the decode() call, but also when accessing the data later, for example listing elements, or by accessing some properties of the model descriptor.

S-63 specific warnings

While decoding an S-63 catalog (in the decode() method), you will also be notified of non-fatal cell errors through handleCellWarnings on your handler. For these, you can expect a TLcdS63Exception with specific error codes:

  • Cells for which there is no permit: SSE 011. These cells will not be loaded.

  • Cells for which the subscription is about to expire: SSE 020. The cells will still be loaded.

  • Cells for which the subscription expired: SSE 015. The cells will still be loaded.