[
https://issues.apache.org/jira/browse/TIKA-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585082#comment-13585082
]
Michael McCandless commented on TIKA-1074:
------------------------------------------
bq. My app needs to extract text even from corrupt documents.
That's exactly the intent here as well.
bq. Currently I am setting ParseContext with a custom AutoDetectParser that,
when an exception is hit, e.g. visiting an embedded, catches the exception,
logs it AND extracts raw/binary strings from the problematic doc (or embedded)
Wait, the exceptions that this change now catches & logs is in the
decoding an OLE10 embedded entry (into its byte[] data), not in
actually parsing of the resulting byte[] data. If the exception is
hit later when we recurse into parseEmbedded, the exception is still
thrown as before, so your custom AutoDetectParser will still
see/handle the exception.
But I think this is separately a good idea (an AutoDetectParser
logging & continuing by default): is this something you could possibly
contribute...?
Do you have an example corrupted document? We could test before/after
this change and see.
> Extraction should continue if an exception is hit visiting an embedded
> document
> -------------------------------------------------------------------------------
>
> Key: TIKA-1074
> URL: https://issues.apache.org/jira/browse/TIKA-1074
> Project: Tika
> Issue Type: Improvement
> Components: parser
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 1.4
>
> Attachments: TIKA-1074.patch, TIKA-1074.patch
>
>
> Spinoff from TIKA-1072.
> In that issue, a problematic document (still not sure if document is corrupt,
> or possible POI bug) caused an exception when visiting the embedded documents.
> If I change Tika to suppress that exception, the rest of the document
> extracts fine.
> So somehow I think we should be more robust here, and maybe log the
> exception, or save/record the exception(s) somewhere so after parsing the app
> could decide what to do about them ...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira