APIdia Launch Partner
Top Description Inners Fields Methods
io.github.spannm.jackcess.util

public Interface ErrorHandler

Known Direct Implementers
io.github.spannm.jackcess.util.ReplacementErrorHandler
Annotations
@FunctionalInterface
Imports
io.github.spannm.jackcess.Column, .Table, java.io.IOException

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 DEFAULT, which just rethrows any exceptions encountered.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ErrorHandler.Location

Provides location information for an error.

Field Summary

Modifier and TypeField and Description
public static final ErrorHandler
DEFAULT

default error handler used if none provided (just rethrows exception)

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

replacement for this row's column
handleRowError
(Column
the info for the column being read
column
,
byte[]
the actual column data for the column being read (which may be null depending on when the exception was thrown during the reading process)
columnData
,
ErrorHandler.Location
the current location of the error
location
,
Exception
the error that was encountered
error
)

Handles an error encountered while reading a column of data from a Table row.

Field Detail

DEFAULTback to summary
public static final ErrorHandler DEFAULT

default error handler used if none provided (just rethrows exception)

Method Detail

handleRowErrorback to summary
public Object handleRowError(Column column, byte[] columnData, ErrorHandler.Location location, 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:Column

the info for the column being read

columnData:byte[]

the actual column data for the column being read (which may be null depending on when the exception was thrown during the reading process)

location:ErrorHandler.Location

the current location of the error

error:Exception

the error that was encountered

Returns:Object

replacement for this row's column

io.github.spannm.jackcess.util back to summary

public Interface ErrorHandler.Location

Known Direct Implementers
io.github.spannm.jackcess.impl.TableImpl.RowState

Provides location information for an error.

Method Summary

Modifier and TypeMethod and Description
public Table

Returns:

the table in which the error occurred
getTable
()

Returns the table in which the error occurred.

public String
toString()

Contains details about the errored row, useful for debugging.

Method Detail

getTableback to summary
public Table getTable()

Returns the table in which the error occurred.

Returns:Table

the table in which the error occurred

toStringback to summary
public String toString()

Contains details about the errored row, useful for debugging.

Annotations
@Override