com.healthmarketscience.jackcess
Interface ErrorHandler

All Known Implementing Classes:
DebugErrorHandler, ReplacementErrorHandler

public interface ErrorHandler

Handler for errors encountered while reading a column of row data from a Table. An instance of this class may be configured at the Database, Table, or Cursor level to customize error handling as desired. The default instance used is Database.DEFAULT_ERROR_HANDLER, which just rethrows any exceptions encountered.

Author:
James Ahlborn

Method Summary
 Object handleRowError(Column column, byte[] columnData, Table.RowState rowState, Exception error)
          Handles an error encountered while reading a column of data from a Table row.
 

Method Detail

handleRowError

Object handleRowError(Column column,
                      byte[] columnData,
                      Table.RowState rowState,
                      Exception error)
                      throws IOException
Handles an error encountered while reading a column of data from a Table row. Handler may either throw an exception (which will be propagated back to the caller) or return a replacement for this row's column value (in which case the row will continue to be read normally).

Parameters:
column - the info for the column being read
columnData - the actual column data for the column being read (which may be null depending on when the exception was thrown during the reading process)
rowState - the current row state for the caller
error - the error that was encountered
Returns:
replacement for this row's column
Throws:
IOException


Copyright © 2005-2013 Health Market Science. All Rights Reserved.