-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
277 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/io/xlate/edi/stream/EDIInputErrorReporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package io.xlate.edi.stream; | ||
|
||
/** | ||
* This interface is used to report non-fatal errors detected in an EDI input. | ||
* | ||
* @since 1.9 | ||
*/ | ||
public interface EDIInputErrorReporter { | ||
/** | ||
* Report the desired message in an application specific format. Only | ||
* warnings and non-fatal errors should be reported through this interface. | ||
* | ||
* Fatal errors will be thrown as EDIStreamException. | ||
* | ||
* @param errorType | ||
* the type of error detected | ||
* @param reader | ||
* the EDIStreamReader that encountered the error | ||
* @throws EDIStreamException | ||
* when errors occur calling the reader | ||
*/ | ||
void report(EDIStreamValidationError errorType, EDIStreamReader reader) throws EDIStreamException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/io/xlate/edi/stream/EDIOutputErrorReporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.xlate.edi.stream; | ||
|
||
/** | ||
* This interface is used to report non-fatal errors detected in an EDI input. | ||
* | ||
* @since 1.9 | ||
*/ | ||
public interface EDIOutputErrorReporter { | ||
/** | ||
* Report the desired message in an application specific format. Only | ||
* warnings and non-fatal errors should be reported through this interface. | ||
* | ||
* Fatal errors will be thrown as {@link EDIStreamException}s. | ||
* | ||
* @param errorType | ||
* the type of error detected | ||
* @param writer | ||
* the EDIStreamWriter that encountered the error | ||
* @param location | ||
* the location of the error, may be different than the location | ||
* returned by the writer (e.g. for derived element positions) | ||
* @param data | ||
* the invalid data, may be null (e.g. for missing required | ||
* element errors) | ||
* @param code | ||
* the reference code for the invalid data, if available from the | ||
* current schema used for validation | ||
*/ | ||
void report(EDIStreamValidationError errorType, EDIStreamWriter writer, Location location, CharSequence data, CharSequence code); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.