Top Description Fields Constructors Methods
com.univocity.parsers.common

public Class DataValidationException

extends DataProcessingException
Class Inheritance

A DataValidationException is an error thrown during the processing of a record successfully parsed, but whose data failed to pass a validation defined by annotation com.univocity.parsers.annotations.Validate
Author
Univocity Software Pty Ltd - [email protected]

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
DataValidationException(String
the error message
message
)

Creates a new validation exception with an error message only.

public
DataValidationException(String
the error message
message
,
Throwable
the cause of the error
cause
)

Creates a new validation exception with an error message and error cause

public
DataValidationException(String
the error message
message
,
Object[]
the row that could not be processed.
row
)

Creates a new validation exception with an error message and the row that could not be validated.

public
DataValidationException(String
the error message
message
,
Object[]
the row that could not be processed.
row
,
Throwable
the cause of the error
cause
)

Creates a new validation exception with an error message, the row that could not be validated, and the error cause.

public
DataValidationException(String
the error message
message
,
int
index of the column that could not be validated.
columnIndex
)

Creates a new validation exception with an error message and the column that could not be validated.

Method Summary

Modifier and TypeMethod and Description
protected String
Inherited from com.univocity.parsers.common.DataProcessingException:
getColumnIndexgetColumnNamegetDetailsgetRowgetValueisFatalisHandledmarkAsHandledmarkAsNonFatalsetColumnIndexsetColumnNamesetDetailssetRowsetValuesetValueupdateMessage

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.univocity.parsers.common.DataProcessingException.serialVersionUID.

Constructor Detail

DataValidationExceptionback to summary
public DataValidationException(String message)

Creates a new validation exception with an error message only.

Parameters
message:String

the error message

DataValidationExceptionback to summary
public DataValidationException(String message, Throwable cause)

Creates a new validation exception with an error message and error cause

Parameters
message:String

the error message

cause:Throwable

the cause of the error

DataValidationExceptionback to summary
public DataValidationException(String message, Object[] row)

Creates a new validation exception with an error message and the row that could not be validated.

Parameters
message:String

the error message

row:Object[]

the row that could not be processed.

DataValidationExceptionback to summary
public DataValidationException(String message, Object[] row, Throwable cause)

Creates a new validation exception with an error message, the row that could not be validated, and the error cause.

Parameters
message:String

the error message

row:Object[]

the row that could not be processed.

cause:Throwable

the cause of the error

DataValidationExceptionback to summary
public DataValidationException(String message, int columnIndex)

Creates a new validation exception with an error message and the column that could not be validated.

Parameters
message:String

the error message

columnIndex:int

index of the column that could not be validated.

Method Detail

getErrorDescriptionback to summary
protected String getErrorDescription()

Overrides com.univocity.parsers.common.DataProcessingException.getErrorDescription.

Doc from com.univocity.parsers.common.AbstractException.getErrorDescription.

Returns a generic description of the error. The result of this method is used by getMessage() to print out a general description of the error before a detailed message of the root cause.

Returns:String

a generic description of the error.

Annotations
@Override