Skip to content
Permalink
Browse files

[processing] If an exception occurs while processing a feature

in a feature-based algorithm, don't try to continue processing
remaining features

Avoids multiple error dialogs appearing for every feature
in a layer...

(cherry-picked from 8326510)
  • Loading branch information
nyalldawson committed Apr 6, 2018
1 parent 2a6feee commit c1af6ec5e8c16f2715e13e887690d2de50fa991c
@@ -855,7 +855,7 @@ Returns the source's coordinate reference system. This will only return a valid
called from a subclasses' processFeature() implementation.
%End

virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0;
virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0 /VirtualErrorHandler=processing_exception_handler/;
%Docstring
Processes an individual input ``feature`` from the source. Algorithms should implement their
logic in this method for performing the algorithm's operation (e.g. replacing the feature's
@@ -888,7 +888,7 @@ class CORE_EXPORT QgsProcessingFeatureBasedAlgorithm : public QgsProcessingAlgor
* can break valid model execution - so use with extreme caution, and consider using
* \a feedback to instead report non-fatal processing failures for features instead.
*/
virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0;
virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0 SIP_VIRTUALERRORHANDLER( processing_exception_handler );

QVariantMap processAlgorithm( const QVariantMap &parameters,
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;

0 comments on commit c1af6ec

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