Skip to content

Commit

Permalink
Merge pull request #136 from tripal/fix-issue-135
Browse files Browse the repository at this point in the history
Fix issue 135
  • Loading branch information
almasaeed2010 authored Jan 19, 2018
2 parents 75f51dc + dc57763 commit e6c66f8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions includes/gene_search.form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,22 @@ function tripal_elasticsearch_gene_search_index_results($display_download = FALS
try {
$es = new ESInstance();
} catch (Exception $exception) {
drupal_set_message($exception->getMessage(), 'error');
drupal_set_message('An error encountered while processing your request. Please try again later.', 'error');
watchdog('tripal_elasticsearch', 'Feature/Gene search form resulted in this error: '.$exception->getMessage(), [], WATCHDOG_ERROR);
return '';
}

$query = tripal_elasticsearch_gene_search_index_query_mapper($_GET);
$results = $es->setTableSearchParams('gene_search_index', '', $query)
->paginate(15);

try {
$results = $es->setTableSearchParams('gene_search_index', '', $query)
->paginate(15);
} catch (Exception $exception) {
drupal_set_message('An error encountered while processing your request. Please try again later.', 'error');
watchdog('tripal_elasticsearch', 'Feature/Gene search form resulted in this error: '.$exception->getMessage(), [], WATCHDOG_ERROR);
return '';
}


$formatted = tripal_elasticsearch_gene_search_index_results_formatter($results['results']);

Expand Down

0 comments on commit e6c66f8

Please sign in to comment.