Class EDIValidationException

All Implemented Interfaces:
Serializable

public class EDIValidationException extends RuntimeException
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 Details

    • event

      protected final EDIStreamEvent event
      The stream event associated with the error, one of the events for which EDIStreamEvent.isError() is true.
    • error

      protected final EDIStreamValidationError error
      The actual error of this exception.
    • location

      protected final transient Location location
      Location of the exception
    • data

      protected final transient CharSequence 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 error
      data - data associated with the validation error
  • Method Details

    • getEvent

      public EDIStreamEvent getEvent()
      Get the stream event associated with the error
      Returns:
      event associated with the error
    • getError

      public EDIStreamValidationError getError()
      Get the type of validation error
      Returns:
      type of validation error
    • getLocation

      public Location getLocation()
      Get the location of the validation error
      Returns:
      location of the validation error
    • getData

      public CharSequence getData()
      Get the data associated with the validation error
      Returns:
      character data associated with the validation error
    • getNextException

      public EDIValidationException getNextException()
      Retrieves the exception chained to this EDIValidationException object by setNextException(EDIValidationException ex).
      Returns:
      the next EDIValidationException object in the chain; null if there are none
      See Also:
    • setNextException

      public void setNextException(EDIValidationException ex)
      Adds an EDIValidationException object to the end of the chain.
      Parameters:
      ex - the new exception that will be added to the end of the EDIValidationException chain
      See Also: