private List<Metadata> parseRecursive(FetchEmitTuple fetchEmitTuple,
                                          HandlerConfig handlerConfig, InputStream stream,
                                          Metadata metadata, ParseContext parseContext) {
        //Intentionally do not add the metadata filter here!
        //We need to let stacktraces percolate
        RecursiveParserWrapperHandler handler = new RecursiveParserWrapperHandler(
                new BasicContentHandlerFactory(handlerConfig.getType(),
                        handlerConfig.getWriteLimit(), handlerConfig.isThrowOnWriteLimitReached(),
                        parseContext), handlerConfig.getMaxEmbeddedResources());

        long start = System.currentTimeMillis();

        preParse(fetchEmitTuple, stream, metadata, parseContext);
        try {
            rMetaParser.parse(stream, handler, metadata, parseContext);
        } catch (SAXException e) {
            LOG.warn("sax problem:" + fetchEmitTuple.getId(), e);
        } catch (EncryptedDocumentException e) {
            LOG.warn("encrypted document:" + fetchEmitTuple.getId(), e);
        } catch (SecurityException e) {
            LOG.warn("security exception:" + fetchEmitTuple.getId(), e);
            throw e;
        } catch (Exception e) {
            LOG.warn("parse exception: " + fetchEmitTuple.getId(), e);
        } finally {
            if (LOG.isTraceEnabled()) {
                LOG.trace("timer -- parse only time: {} ms", System.currentTimeMillis() - start);
            }
        }
        return handler.getMetadataList();
    }
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