@Test public void reindexErrorsAreNotPropagated() throws XWikiException, HibernateException, ComponentLookupException { PatientIndexer indexer = this.mocker.<PatientIndexer>getInstance(PatientIndexer.class); Mockito.doThrow(new NullPointerException()).when(indexer).reindex(); Assert.assertNull(((HibernateCallback<?>) this.mocker.getComponentUnderTest()).doInHibernate(this.session)); }
@Override public Object doInHibernate(final Session session) throws HibernateException, XWikiException { try { this.indexer.reindex(); } catch (final Exception e) { this.logger.error("Error while reindexing patients: [{}]", e); } return null; }
R74695PhenoTips4004DataMigration extends AbstractHibernateDataMigration implements
    HibernateCallback<Object> { @Override public Object doInHibernate(final Session session) throws HibernateException, XWikiException { try { this.indexer.reindex(); } catch (final Exception e) { this.logger.error("Error while reindexing patients: [{}]", e); } return null; } }
R74695PhenoTips4004DataMigration extends AbstractHibernateDataMigration implements
    HibernateCallback<Object> { @Override public Object doInHibernate(final Session session) throws HibernateException, XWikiException { try { this.indexer.reindex(); } catch (final Exception e) { this.logger.error("Error while reindexing patients: [{}]", e); } return null; }  }
R74695PhenoTips4004DataMigration extends AbstractHibernateDataMigration implements
    HibernateCallback<Object> { @Override public Object doInHibernate(final Session session) throws HibernateException, XWikiException { try { this.indexer.reindex(); } catch (final Exception e) { this.logger.error("Error while reindexing patients: [{}]", e); } return null; }  @Override String getDescription(); @Override XWikiDBVersion getVersion(); @Override void hibernateMigrate(); @Override Object doInHibernate(final Session session); }
R74695PhenoTips4004DataMigration extends AbstractHibernateDataMigration implements
    HibernateCallback<Object> { @Override public Object doInHibernate(final Session session) throws HibernateException, XWikiException { try { this.indexer.reindex(); } catch (final Exception e) { this.logger.error("Error while reindexing patients: [{}]", e); } return null; }  @Override String getDescription(); @Override XWikiDBVersion getVersion(); @Override void hibernateMigrate(); @Override Object doInHibernate(final Session session);  }