Skip to content

Commit 29b39ba

Browse files
committed
Push error message to messagebar, stop adding a new layer if an error occured
1 parent d4ff203 commit 29b39ba

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

QGISDigitransitGeocoding/build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
if "test/" not in fil and "test\\" not in fil
1919
]
2020
locales = ["fi"]
21-
profile = "digi"
21+
profile = "digitransit"
2222
ui_files = list(glob.glob("**/*.ui", recursive=True))
2323
resources = list(glob.glob("**/*.qrc", recursive=True))
2424
extra_dirs = ["resources"]

QGISDigitransitGeocoding/ui/digitransit_geocoder_dockwidget.py

+2
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,14 @@ def handle_search_response(self, reply):
304304
reply.errorString(), "QGISDigitransitGeocoding", Qgis.Warning
305305
)
306306
else:
307+
self.iface.messageBar().pushMessage("Error", "An error occured. Check the log for details.", level=1, duration=10)
307308
QgsMessageLog.logMessage(
308309
str(error), "QGISDigitransitGeocoding", Qgis.Warning
309310
)
310311
QgsMessageLog.logMessage(
311312
reply.errorString(), "QGISDigitransitGeocoding", Qgis.Warning
312313
)
314+
return
313315

314316
try:
315317
if len(self.features) > 0 and self.radiobuttonresultsshowall.isChecked():

0 commit comments

Comments
 (0)