public class BeanReaderException extends BeanIOException
BeanReader or Unmarshaller.
In most cases, a subclass of this exception is thrown. In a few (but rare) fatal cases, this exception may be thrown directly.
BeanReader,
Serialized Form| Constructor and Description |
|---|
BeanReaderException(String message)
Constructs a new BeanReaderException.
|
BeanReaderException(String message,
Throwable cause)
Constructs a new BeanReaderException.
|
| Modifier and Type | Method and Description |
|---|---|
RecordContext |
getContext()
Deprecated.
|
RecordContext |
getRecordContext()
Returns the record context that caused the error.
|
RecordContext |
getRecordContext(int index)
Returns the record context for a given record index.
|
int |
getRecordCount()
Returns the number of unmarshalled records with context information
available if
getRecordContext(int) is called. |
protected void |
setRecordContext(RecordContext recordContext)
Sets the record context that caused the exception.
|
protected void |
setRecordContext(RecordContext[] recordContext)
Sets the record context(s) that caused the exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic BeanReaderException(String message)
message - the error messagepublic int getRecordCount()
getRecordContext(int) is called.public RecordContext getContext()
getRecordContext()RecordContextpublic RecordContext getRecordContext()
RecordContextgetRecordContext(int)public RecordContext getRecordContext(int index) throws IndexOutOfBoundsException
index - the record indexRecordContextIndexOutOfBoundsException - if there is no record for the given indexgetRecordCount()protected void setRecordContext(RecordContext recordContext)
setRecordContext(RecordContext[]).recordContext - the RecordContextprotected void setRecordContext(RecordContext[] recordContext)
recordContext - the array of RecordContext