You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Keith R. Bennett (JIRA)" <ji...@apache.org> on 2007/09/24 21:27:50 UTC

[jira] Created: (TIKA-29) Exceptions are being swallowed that need to be thrown.

Exceptions are being swallowed that need to be thrown.
------------------------------------------------------

                 Key: TIKA-29
                 URL: https://issues.apache.org/jira/browse/TIKA-29
             Project: Tika
          Issue Type: Bug
          Components: general
    Affects Versions: 0.1-incubator
            Reporter: Keith R. Bennett
            Priority: Critical
             Fix For: 0.1-incubator


There are many cases in several classes where exceptions are being swallowed where they should be thrown instead.

It is important that the caller be notified of an error if one occurs.  The caller needs the opportunity to record the failure and set aside the document for future processing, or whatever else needs to be done in case of error.

I'm marking this critical because we have no way of knowing the importance of the missing data; it could be of the utmost importance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TIKA-29) Exceptions are being swallowed that need to be thrown.

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530269 ] 

Jukka Zitting commented on TIKA-29:
-----------------------------------

"Unswallowed" at least some of the exceptions in the fix for TIKA-31. During that fix I probably also made major conflicts with your patch here, sorry for that... :-(

> Exceptions are being swallowed that need to be thrown.
> ------------------------------------------------------
>
>                 Key: TIKA-29
>                 URL: https://issues.apache.org/jira/browse/TIKA-29
>             Project: Tika
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 0.1-incubator
>            Reporter: Keith R. Bennett
>            Priority: Critical
>             Fix For: 0.1-incubator
>
>         Attachments: tika-29-diag.patch
>
>
> There are many cases in several classes where exceptions are being swallowed where they should be thrown instead.
> It is important that the caller be notified of an error if one occurs.  The caller needs the opportunity to record the failure and set aside the document for future processing, or whatever else needs to be done in case of error.
> I'm marking this critical because we have no way of knowing the importance of the missing data; it could be of the utmost importance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TIKA-29) Exceptions are being swallowed that need to be thrown.

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529991 ] 

Chris A. Mattmann commented on TIKA-29:
---------------------------------------

Keith:

Could you be more specific as to exactly where (as in which Tika classes) this is happening? It may be obvious (by browsing through all the code), however, it would be nice to avoid that if you've already done the legwork. Please let know us specifically the places that you see this happening.

Thanks,
  Chris


> Exceptions are being swallowed that need to be thrown.
> ------------------------------------------------------
>
>                 Key: TIKA-29
>                 URL: https://issues.apache.org/jira/browse/TIKA-29
>             Project: Tika
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 0.1-incubator
>            Reporter: Keith R. Bennett
>            Priority: Critical
>             Fix For: 0.1-incubator
>
>
> There are many cases in several classes where exceptions are being swallowed where they should be thrown instead.
> It is important that the caller be notified of an error if one occurs.  The caller needs the opportunity to record the failure and set aside the document for future processing, or whatever else needs to be done in case of error.
> I'm marking this critical because we have no way of knowing the importance of the missing data; it could be of the utmost importance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TIKA-29) Exceptions are being swallowed that need to be thrown.

Posted by "Keith R. Bennett (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530288 ] 

Keith R. Bennett commented on TIKA-29:
--------------------------------------

Jukka -

Do you mean my patch that contains the:

// Swallowed exception 

comments?  If so, no problem.  The parsers were the bulk of the swallowed exceptions anyway, and I think you got all of them.  The file list above with numbers of occurrences by file should be enough for someone to find them anyway.

I didn't intend for them to be committed anyway, just for illustrative purposes.  But if you want them committed, I can regenerate a patch.

Thanks,
Keith


> Exceptions are being swallowed that need to be thrown.
> ------------------------------------------------------
>
>                 Key: TIKA-29
>                 URL: https://issues.apache.org/jira/browse/TIKA-29
>             Project: Tika
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 0.1-incubator
>            Reporter: Keith R. Bennett
>            Priority: Critical
>             Fix For: 0.1-incubator
>
>         Attachments: tika-29-diag.patch
>
>
> There are many cases in several classes where exceptions are being swallowed where they should be thrown instead.
> It is important that the caller be notified of an error if one occurs.  The caller needs the opportunity to record the failure and set aside the document for future processing, or whatever else needs to be done in case of error.
> I'm marking this critical because we have no way of knowing the importance of the missing data; it could be of the utmost importance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TIKA-29) Exceptions are being swallowed that need to be thrown.

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TIKA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved TIKA-29.
-------------------------------

    Resolution: Fixed

Agreed. I'm marking this as resolved based on work from TIKA-31.

> Exceptions are being swallowed that need to be thrown.
> ------------------------------------------------------
>
>                 Key: TIKA-29
>                 URL: https://issues.apache.org/jira/browse/TIKA-29
>             Project: Tika
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 0.1-incubator
>            Reporter: Keith R. Bennett
>            Priority: Critical
>             Fix For: 0.1-incubator
>
>         Attachments: tika-29-diag.patch
>
>
> There are many cases in several classes where exceptions are being swallowed where they should be thrown instead.
> It is important that the caller be notified of an error if one occurs.  The caller needs the opportunity to record the failure and set aside the document for future processing, or whatever else needs to be done in case of error.
> I'm marking this critical because we have no way of knowing the importance of the missing data; it could be of the utmost importance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TIKA-29) Exceptions are being swallowed that need to be thrown.

Posted by "Keith R. Bennett (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TIKA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith R. Bennett updated TIKA-29:
---------------------------------

    Attachment: tika-29-diag.patch

All -

I've marked some questionable catch clauses with:

// Swallowed exception

Here is the distribution by file:

mime/MimeTypesReader.java:3
mime/MimeUtils.java:2
parser/html/HtmlParser.java:1
parser/msexcel/MsExcelParser.java:2
parser/mspowerpoint/ContentReaderListener.java:4
parser/mspowerpoint/MsPowerPointParser.java:2
parser/msword/MsWordParser.java:2
parser/opendocument/OpenOfficeParser.java:4
parser/pdf/PDFParser.java:6
parser/rtf/RTFParser.java:3
parser/txt/TXTParser.java:4
parser/xml/XMLParser.java:3
utils/MSExtractor.java:1
utils/Utils.java:4

I tried to omit the legitimate cases, but there may be some false positives.

Attached is a patch file that, when applied, will insert the comments in their proper places to the build I checked out a few hours ago (revision #578987 I believe).

Regards,
Keith




> Exceptions are being swallowed that need to be thrown.
> ------------------------------------------------------
>
>                 Key: TIKA-29
>                 URL: https://issues.apache.org/jira/browse/TIKA-29
>             Project: Tika
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 0.1-incubator
>            Reporter: Keith R. Bennett
>            Priority: Critical
>             Fix For: 0.1-incubator
>
>         Attachments: tika-29-diag.patch
>
>
> There are many cases in several classes where exceptions are being swallowed where they should be thrown instead.
> It is important that the caller be notified of an error if one occurs.  The caller needs the opportunity to record the failure and set aside the document for future processing, or whatever else needs to be done in case of error.
> I'm marking this critical because we have no way of knowing the importance of the missing data; it could be of the utmost importance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.