Log FileNotFoundException on missing attachment
-----------------------------------------------

                 Key: JSPWIKI-721
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-721
             Project: JSPWiki
          Issue Type: Improvement
          Components: Core & storage
    Affects Versions: 2.8.4
            Reporter: Jürgen Weber
            Priority: Minor


We messed with the repository and had an attachment folder without the actual 
attachment. This results in a FileNotFoundException in
BasicAttachmentProvider.getAttachmentInfo(WikiPage, String, int)
and comes up as the infamous 
java.lang.IllegalArgumentException: Attempt to provide a null filter - this 
should never happen.  Please check your configuration (or if you're a 
developer, check your own code.)
        at 
com.ecyrd.jspwiki.filters.FilterManager.addPageFilter(FilterManager.java:145)

A log in the FileNotFoundException catch block would help a lot:

   catch( FileNotFoundException e )
        {
            log.error("Can't get attachment properties for "+att, e );
            return null;
        }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to