private void recordEmbeddedMetadata(Metadata metadata, ParseContext context) {
        ParseRecord record = context.get(ParseRecord.class);
        if (record == null) {
            //this should never happen
            return;
        }
        for (Exception e : record.getExceptions()) {
            metadata.add(TikaCoreProperties.EMBEDDED_EXCEPTION, ExceptionUtils.getStackTrace(e));
        }
        for (String msg : record.getWarnings()) {
            metadata.add(TikaCoreProperties.EMBEDDED_WARNING, msg);
        }
        if (record.isWriteLimitReached()) {
            metadata.set(TikaCoreProperties.WRITE_LIMIT_REACHED, true);
        }

        for (Metadata m : record.getMetadataList()) {
            for (String n : m.names()) {
                for (String v : m.getValues(n)) {
                    metadata.add(n, v);
                }
            }
        }
    }
Delegates the call to the matching component parser.
<p>
Potential {@link RuntimeException}s, {@link IOException}s and
{@link SAXException}s unrelated to the given input stream and content
handler are automatically wrapped into {@link TikaException}s to better
honor the {@link Parser} contract.
tika-core/src/main/java/org/apache/tika/parser/CompositeParser.java