Skip to content
Permalink
Browse files

[processing] Fix some exceptions

  • Loading branch information
nyalldawson committed May 15, 2018
1 parent c9e5a36 commit 74b0e910db188a4ef7ba93aa50560209fc5ad78c
@@ -134,7 +134,7 @@ def displayName(self):
def processAlgorithm(self, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT_LAYER, context)
if source is None:
raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT))
raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT_LAYER))

field_name = self.parameterAsString(parameters, self.FIELD_NAME, context)
field = source.fields().at(source.fields().lookupField(field_name))
@@ -127,7 +127,7 @@ def processAlgorithm(self, parameters, context, feedback):
def doCheck(self, method, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT_LAYER, context)
if source is None:
raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT))
raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT_LAYER))

(valid_output_sink, valid_output_dest_id) = self.parameterAsSink(parameters, self.VALID_OUTPUT, context,
source.fields(), source.wkbType(), source.sourceCrs())
@@ -76,7 +76,7 @@ def displayName(self):
def processAlgorithm(self, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT_VECTOR, context)
if source is None:
raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT))
raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT_VECTOR))

raster_layer = self.parameterAsRasterLayer(parameters, self.INPUT_RASTER, context)
rasterPath = raster_layer.source()
@@ -76,7 +76,7 @@ def displayName(self):
def processAlgorithm(self, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT_VECTOR, context)
if source is None:
raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT))
raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT_VECTOR))

raster_layer = self.parameterAsRasterLayer(parameters, self.INPUT_RASTER, context)
rasterPath = raster_layer.source()

0 comments on commit 74b0e91

Please sign in to comment.
You can’t perform that action at this time.