Skip to content

Commit

Permalink
[MetaSearch]: add error handling for paging workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Feb 27, 2015
1 parent 4b4fc6b commit 5ab9103
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions python/plugins/MetaSearch/dialogs/maindialog.py
Expand Up @@ -626,9 +626,20 @@ def navigate(self):

QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))

self.catalog.getrecords2(constraints=self.constraints,
maxrecords=self.maxrecords,
startposition=self.startfrom, esn='full')
try:
self.catalog.getrecords2(constraints=self.constraints,
maxrecords=self.maxrecords,
startposition=self.startfrom, esn='full')
except ExceptionReport, err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('Search error'),
self.tr('Search error: %s') % err)
return
except Exception, err:
QApplication.restoreOverrideCursor()
QMessageBox.warning(self, self.tr('Connection error'),
self.tr('Connection error: %s') % err)
return

QApplication.restoreOverrideCursor()

Expand Down

0 comments on commit 5ab9103

Please sign in to comment.