getErrorIndex()
getErrorIndex() returns an array containing indices pointing to each row location that contained an element which failed a tokenization operation.
Syntax
public int[] getErrorIndex();
Note
Each index in the array returned via getErrorIndex() maps to a problem row in the array returned by getOutput(). When you are inserting (tokenizing), this output array should contain tokens. When detokenizing, i.e., when calling TokenService.get(), the returned indices map to the order of the original plaintext values.
Returned Values
An integer array of ErrorIndex, see table in the below example.
Example
The following table shows the error information available for row-level errors.
Error Order | Error Index | Error Message |
---|---|---|
0 | 2 | Error for value, " " is: "errorMessage” |
1 | 5 | Null element. |
2 | 6 | Invalid data element. |
Note
Error Order: Zero-indexed number is assigned to each bypassed error.
Error Index: Row number of the error in the original array (input).