private void _preParse(FetchEmitTuple t, TikaInputStream tis, Metadata metadata,
                           ParseContext parseContext) {
        if (digester != null) {
            try {
                digester.digest(tis, metadata, parseContext);
            } catch (IOException e) {
                LOG.warn("problem digesting: " + t.getId(), e);
            }
        }
        try {
            MediaType mt = detector.detect(tis, metadata);
            metadata.set(Metadata.CONTENT_TYPE, mt.toString());
            metadata.set(TikaCoreProperties.CONTENT_TYPE_PARSER_OVERRIDE, mt.toString());
        } catch (IOException e) {
            LOG.warn("problem detecting: " + t.getId(), e);
        }
        EmbeddedDocumentBytesConfig embeddedDocumentBytesConfig = parseContext.get(EmbeddedDocumentBytesConfig.class);
        if (embeddedDocumentBytesConfig != null &&
                embeddedDocumentBytesConfig.isIncludeOriginal()) {
            EmbeddedDocumentBytesHandler embeddedDocumentByteStore = parseContext.get(EmbeddedDocumentBytesHandler.class);
            try (InputStream is = Files.newInputStream(tis.getPath())) {
                embeddedDocumentByteStore.add(0, metadata, is);
            } catch (IOException e) {
                LOG.warn("problem reading source file into embedded document byte store", e);
            }
        }
    }
returns stack trace if there was a container exception or empty string
if there was no stacktrace

@param t
@param metadataList
@return
tika-core/src/main/java/org/apache/tika/pipes/PipesServer.java