Skip to content

Commit

Permalink
GeoAlgorithmExecutionException -> QgsProcessingException
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson authored and alexbruy committed Nov 9, 2017
1 parent 65faf54 commit 1fc395b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/plugins/processing/algs/saga/SagaAlgorithm.py
Expand Up @@ -29,9 +29,9 @@
import os
import importlib
from qgis.core import (QgsProcessingUtils,
QgsProcessingException,
QgsMessageLog)
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import (getParameterFromString,
ParameterExtent,
ParameterRaster,
Expand Down Expand Up @@ -162,7 +162,7 @@ def processAlgorithm(self, parameters, context, feedback):
filename = dataobjects.exportVectorLayer(layer)
self.exportedLayers[param.value] = filename
elif not parameters[param.name()].endswith('shp'):
raise GeoAlgorithmExecutionException(
raise QgsProcessingException(
self.tr('Unsupported file format'))
if isinstance(param, ParameterTable):
if param.name() not in parameters or parameters[param.name()] is None:
Expand All @@ -172,7 +172,7 @@ def processAlgorithm(self, parameters, context, feedback):
filename = dataobjects.exportTable(table)
self.exportedLayers[parameters[param.name()]] = filename
elif not parameters[param.name()].endswith('shp'):
raise GeoAlgorithmExecutionException(
raise QgsProcessingException(
self.tr('Unsupported file format'))
if isinstance(param, ParameterMultipleInput):
if param.name() not in parameters or parameters[param.name()] is None:
Expand Down Expand Up @@ -200,7 +200,7 @@ def processAlgorithm(self, parameters, context, feedback):
filename = dataobjects.exportVectorLayer(layer)
self.exportedLayers[layerfile] = filename
elif not layerfile.endswith('shp'):
raise GeoAlgorithmExecutionException(
raise QgsProcessingException(
self.tr('Unsupported file format'))

# TODO - set minimum extent
Expand Down

0 comments on commit 1fc395b

Please sign in to comment.