[ 
https://issues.apache.org/jira/browse/PDFBOX-877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Hewson updated PDFBOX-877:
-------------------------------

    Component/s: Documentation

> processOperator breaks contract - never throws IOException
> ----------------------------------------------------------
>
>                 Key: PDFBOX-877
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-877
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.1.0
>            Reporter: Jimmy Juncker
>
> PDFStreamEngine.processOperator documents to throw IOException. However, all 
> Exceptions are swallowed (in a catch Exception clause) which makes it 
> impossible for us to handle:
>     /**
>      * This is used to handle an operation.
>      *
>      * @param operator The operation to perform.
>      * @param arguments The list of arguments.
>      *
>      * @throws IOException If there is an error processing the operation.
>      */
>     protected void processOperator( PDFOperator operator, List arguments ) 
> throws IOException
>     {
>         try
>         {
>             String operation = operator.getOperation();
>             OperatorProcessor processor = (OperatorProcessor)operators.get( 
> operation );
>             if( processor != null )
>             {
>                 processor.setContext(this);
>                 processor.process( operator, arguments );
>             }
>             else
>             {
>                 if (!unsupportedOperators.contains(operation)) 
>                 {
>                     log.info("unsupported/disabled operation: " + operation);
>                     unsupportedOperators.add(operation);
>                 }
>             }
>         }
>         catch (Exception e)
>         {
>             log.warn(e, e);
>         }
>     }



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to