java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.xlate.edi.stream.EDIValidationException
- All Implemented Interfaces:
Serializable
Runtime exception that may occur when reading or writing EDI any the EDI
error event would not otherwise be handled by an application. For example,
when writing EDI and no EDIOutputErrorReporter is in use.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CharSequenceThe data from the data stream (input for a reader or output for a writer) associated with the validation error.protected final EDIStreamValidationErrorThe actual error of this exception.protected final EDIStreamEventThe stream event associated with the error, one of the events for which EDIStreamEvent.isError() is true.protected final LocationLocation of the exception -
Constructor Summary
ConstructorsConstructorDescriptionEDIValidationException(EDIStreamEvent event, EDIStreamValidationError error, Location location, CharSequence data) Construct an EDIValidationException with the given data elements. -
Method Summary
Modifier and TypeMethodDescriptiongetData()Get the data associated with the validation errorgetError()Get the type of validation errorgetEvent()Get the stream event associated with the errorGet the location of the validation errorRetrieves the exception chained to thisEDIValidationExceptionobject by setNextException(EDIValidationException ex).voidAdds anEDIValidationExceptionobject to the end of the chain.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
event
The stream event associated with the error, one of the events for which EDIStreamEvent.isError() is true. -
error
The actual error of this exception. -
location
Location of the exception -
data
The data from the data stream (input for a reader or output for a writer) associated with the validation error.
-
-
Constructor Details
-
EDIValidationException
public EDIValidationException(EDIStreamEvent event, EDIStreamValidationError error, Location location, CharSequence data) Construct an EDIValidationException with the given data elements.- Parameters:
event- stream event (required)error- validation error (required)location- location of the validation errordata- data associated with the validation error
-
-
Method Details
-
getEvent
Get the stream event associated with the error- Returns:
- event associated with the error
-
getError
Get the type of validation error- Returns:
- type of validation error
-
getLocation
Get the location of the validation error- Returns:
- location of the validation error
-
getData
Get the data associated with the validation error- Returns:
- character data associated with the validation error
-
getNextException
Retrieves the exception chained to thisEDIValidationExceptionobject by setNextException(EDIValidationException ex).- Returns:
- the next
EDIValidationExceptionobject in the chain;nullif there are none - See Also:
-
setNextException
Adds anEDIValidationExceptionobject to the end of the chain.- Parameters:
ex- the new exception that will be added to the end of theEDIValidationExceptionchain- See Also:
-