Skip to content

Commit 5ab9103

Browse files
committed
[MetaSearch]: add error handling for paging workflows
1 parent 4b4fc6b commit 5ab9103

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

python/plugins/MetaSearch/dialogs/maindialog.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,20 @@ def navigate(self):
626626

627627
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
628628

629-
self.catalog.getrecords2(constraints=self.constraints,
630-
maxrecords=self.maxrecords,
631-
startposition=self.startfrom, esn='full')
629+
try:
630+
self.catalog.getrecords2(constraints=self.constraints,
631+
maxrecords=self.maxrecords,
632+
startposition=self.startfrom, esn='full')
633+
except ExceptionReport, err:
634+
QApplication.restoreOverrideCursor()
635+
QMessageBox.warning(self, self.tr('Search error'),
636+
self.tr('Search error: %s') % err)
637+
return
638+
except Exception, err:
639+
QApplication.restoreOverrideCursor()
640+
QMessageBox.warning(self, self.tr('Connection error'),
641+
self.tr('Connection error: %s') % err)
642+
return
632643

633644
QApplication.restoreOverrideCursor()
634645

0 commit comments

Comments
 (0)