Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-4062

OfflineContentHandler/ContentHandlerDecorator does not provide option for custom error handling

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0
    • 2.9.0
    • tika-core
    • None

    Description

      OfflineContentHandler/ContentHandlerDecorator does not provide option for custom error handling

      Prior to the change of passing OfflineContentHandler to SAX Parser in XMLReaderUtils.parseSAX, one could pass a custom ContentHandlerDecorator to handle exception or override error/warning etc methods. The same is not possible now because the default impl for handleException in the OfflineContentHandler's parent ContentHandlerDecorator just throws exception as shown below:

       

       protected void handleException(SAXException exception) throws SAXException

      {         throw exception;     }

       

      which could probably be (at minimum)

      public void handleException(SAXException exception) throws SAXException

      {         handler.handleException(exception);     }

       

      This is breaking our app's behavior. Please take it as priority.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ravijha Ravi Ranjan Jha
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: