Show an error message when a query yields an invalid layer

... instead of failing silently
This commit is contained in:
Alessandro Pasotti 2018-12-14 09:59:41 +01:00
parent e58abfd0d6
commit 3618d63ca6

View File

@ -429,6 +429,8 @@ class DlgSqlWindow(QWidget, Ui_Dialog):
if layer.isValid():
return layer
else:
e = BaseError(self.tr("There was an error creating the SQL layer, please check the logs for further information."))
DlgDbError.showError(e, self)
return None
def loadSqlLayer(self):