catch ( TorqueException e )
catch ( Exception e )
    private boolean checkForUpdate()    {        ContentSource source = this.fetcher.getFetchLocation();        boolean isFetchRequired = true;        long fetchPeriod = new Date().getTime() - source.getContentSourceUpdateTimespan();        Criteria crit = new Criteria();        crit.addSelectColumn( ContentPeer.CONTENT_ID );        crit.add( ContentPeer.CONTENT_SOURCE_ID, source.getContentSourceId() );        crit.add( ContentPeer.CONTENT_TO_DELETE, false );        try        {            //first fetch for this content source?            isFetchRequired = ContentPeer.doSelectVillageRecords( crit ).isEmpty();            //already fetched this content source in past, check if update is neccessary            if (!isFetchRequired)            {                crit.clear();                crit.addSelectColumn( ContentPeer.CONTENT_ID );                crit.add( ContentPeer.CONTENT_SOURCE_ID, source.getContentSourceId() );                crit.add( ContentPeer.CONTENT_TO_DELETE, false );                crit.add( ContentPeer.CONTENT_RECEIVE_DATETIME, new Date( fetchPeriod ), Criteria.GREATER_THAN );                crit.setDistinct();                isFetchRequired = ContentPeer.doSelectVillageRecords( crit ).isEmpty();            }        }        catch ( TorqueException e )        {            logger.error( "Error while fetching contents for content source " + source.getContentSourceName()                    + " from database.", e );            isFetchRequired = true;        }        return isFetchRequired;    }