protected void save(String siddhiAppName, String streamName, ErroneousEvent erroneousEvent,
                        ErroneousEventType eventType, ErrorOccurrence errorOccurrence, ErrorType errorType)
            throws ErrorStoreException {
        long timestamp = System.currentTimeMillis();
        Object event = erroneousEvent.getEvent();
        Throwable throwable = erroneousEvent.getThrowable();
        String cause;
        if (throwable != null) {
            if (throwable.getCause() != null) {
                cause = throwable.getCause().getMessage();
            } else {
                cause = throwable.getMessage();
            }
        } else {
            cause = "Unknown";
        }

        try {
            Object originalPayload = erroneousEvent.getOriginalPayload();
            byte[] eventAsBytes = (event != null && eventType == ErroneousEventType.PAYLOAD_STRING) ?
                    ErrorHandlerUtils.getAsBytes(event.toString()) : ErrorHandlerUtils.getAsBytes(event);
            byte[] stackTraceAsBytes = (throwable != null) ?
                    ErrorHandlerUtils.getThrowableStackTraceAsBytes(throwable) : ErrorHandlerUtils.getAsBytes(null);
            byte[] originalPayloadAsBytes = ErrorHandlerUtils.getAsBytes(originalPayload);

            produce(timestamp, siddhiAppName, streamName, eventAsBytes, cause, stackTraceAsBytes,
                    originalPayloadAsBytes, errorOccurrence.toString(), eventType.toString(), errorType.toString());
        } catch (IOException e) {
            throw new ErrorStoreException("Failure occurred during byte array conversion.", e);
        }
    }
Denotes the abstract error store in which, error event entries will be stored.
modules/siddhi-core/src/main/java/io/siddhi/core/util/error/handler/store/ErrorStore.java