private static ErroneousEventType getErroneousEventType(Object event) {
        if (event instanceof ReplayableTableRecord) {
            return ErroneousEventType.REPLAYABLE_TABLE_RECORD;
        } else if (event instanceof ComplexEvent) {
            return ErroneousEventType.COMPLEX_EVENT;
        } else if (event instanceof Event) {
            return ErroneousEventType.EVENT;
        } else if (event instanceof Event[]) {
            return ErroneousEventType.EVENT_ARRAY;
        } else if (event instanceof List) {
            return ErroneousEventType.EVENT_LIST;
        } else {
            return ErroneousEventType.PAYLOAD_STRING;
        }
    }
Sends an erroneous event to the error store in order to save that.

@param errorStore     Error store object.
@param occurrence     Occurrence point of the error.
@param siddhiAppName  Siddhi app name.
@param erroneousEvent The event which was collected due to an error.
@param streamName     The stream from which, error was collected.
modules/siddhi-core/src/main/java/io/siddhi/core/util/error/handler/util/ErrorStoreHelper.java