BeanIO 2.0.4

org.beanio
Class InvalidRecordGroupException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.beanio.BeanIOException
                  extended by org.beanio.BeanReaderException
                      extended by org.beanio.InvalidRecordException
                          extended by org.beanio.InvalidRecordGroupException
All Implemented Interfaces:
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 to read() are not affected.

Since:
2.0
Author:
Kevin Seim
See Also:
Serialized Form

Constructor Summary
InvalidRecordGroupException(RecordContext[] context, String message, String groupName)
          Constructs a new InvalidRecordGroupException.
 
Method Summary
protected  void appendMessageDetails(StringBuilder s)
          Called by InvalidRecordException.toString() to append record context details to the error message.
 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
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvalidRecordGroupException

public InvalidRecordGroupException(RecordContext[] context,
                                   String message,
                                   String groupName)
Constructs a new InvalidRecordGroupException.

Parameters:
context - one or more record contexts that make up the group
message - the error message
groupName - the group name
Method Detail

getRecordName

public String getRecordName()
Description copied from class: InvalidRecordException
Returns the name of the record or group that failed validation.

Overrides:
getRecordName in class InvalidRecordException
Returns:
the record or group name

appendMessageDetails

protected void appendMessageDetails(StringBuilder s)
Description copied from class: InvalidRecordException
Called by InvalidRecordException.toString() to append record context details to the error message.

Overrides:
appendMessageDetails in class InvalidRecordException
Parameters:
s - the message to append

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim