[ 
https://issues.apache.org/jira/browse/TIKA-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585165#comment-13585165
 ] 

Luis Filipe Nassif commented on TIKA-1074:
------------------------------------------

bq. 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.
Hum you are right, I will still see exceptions from embedded docs. And this 
will improve parsing of the container.

bq. But I think this is separately a good idea (an AutoDetectParser logging & 
continuing by default): is this something you could possibly contribute...?
I would like to, but I do not think my code has good quality. I think the 
meaning of "continuing" is application specific. My app has a Raw/Binary 
StringParser that uses heuristics to extract mixed ISO-8859-1, UTF-8 and UTF-16 
strings from unknown files. It is the fallBackParser and it is also called when 
some exception is thrown by a corrupted doc. I could upload both, but they need 
a lot of enhacements. 

bq. Do you have an example corrupted document? We could test before/after this 
change and see.
Not of the kind you have, but now i see the parsing will be better after this 
change.
                
> 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

Reply via email to