Skip to content

Commit e6ff7e0

Browse files
committed
Raise an exception if the necessary parameter was not specified
1 parent fdb6a2b commit e6ff7e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/plugins/processing/algs/qgis/TilesXYZ.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,12 @@ def processAlgorithm(self, parameters, context, feedback):
288288
output_format = self.outputs[self.parameterAsEnum(parameters, self.OUTPUT_FORMAT, context)]
289289
if output_format == 'Directory':
290290
output_dir = self.parameterAsString(parameters, self.OUTPUT_DIRECTORY, context)
291+
if not output_dir:
292+
raise QgsProcessingException(self.tr('You need to specify output directory.'))
291293
else: # MBTiles
292294
output_file = self.parameterAsString(parameters, self.OUTPUT_FILE, context)
295+
if not output_file:
296+
raise QgsProcessingException(self.tr('You need to specify output filename.'))
293297
tile_width = 256
294298
tile_height = 256
295299

0 commit comments

Comments
 (0)