Package org.beanio
Class InvalidRecordGroupException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.beanio.BeanIOException
-
- org.beanio.BeanReaderException
-
- org.beanio.InvalidRecordException
-
- org.beanio.InvalidRecordGroupException
-
- All Implemented Interfaces:
java.io.Serializable
public class InvalidRecordGroupException extends InvalidRecordException
Exception thrown when one or more records fail validation while unmarshalling a record group.The
getRecordName()
method will return the name of the group (from the mapping file) that failed validation.An invalid record group does not affect the state of a
BeanReader
, and subsequent calls toread()
are not affected.- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvalidRecordGroupException(RecordContext[] context, java.lang.String message, java.lang.String groupName)
Constructs a newInvalidRecordGroupException
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendMessageDetails(java.lang.StringBuilder s)
Called byInvalidRecordException.toString()
to append record context details to the error message.java.lang.String
getRecordName()
Returns the name of the record or group that failed validation.-
Methods inherited from class org.beanio.InvalidRecordException
toString
-
Methods inherited from class org.beanio.BeanReaderException
getContext, getRecordContext, getRecordContext, getRecordCount, setRecordContext, setRecordContext
-
-
-
-
Constructor Detail
-
InvalidRecordGroupException
public InvalidRecordGroupException(RecordContext[] context, java.lang.String message, java.lang.String groupName)
Constructs a newInvalidRecordGroupException
.- Parameters:
context
- one or more record contexts that make up the groupmessage
- the error messagegroupName
- the group name
-
-
Method Detail
-
getRecordName
public java.lang.String getRecordName()
Description copied from class:InvalidRecordException
Returns the name of the record or group that failed validation.- Overrides:
getRecordName
in classInvalidRecordException
- Returns:
- the record or group name
-
appendMessageDetails
protected void appendMessageDetails(java.lang.StringBuilder s)
Description copied from class:InvalidRecordException
Called byInvalidRecordException.toString()
to append record context details to the error message.- Overrides:
appendMessageDetails
in classInvalidRecordException
- Parameters:
s
- the message to append
-
-