Skip to content

Commit c1af6ec

Browse files
committedApr 6, 2018
[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)
1 parent 2a6feee commit c1af6ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎python/core/processing/qgsprocessingalgorithm.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ Returns the source's coordinate reference system. This will only return a valid
855855
called from a subclasses' processFeature() implementation.
856856
%End
857857

858-
virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0;
858+
virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0 /VirtualErrorHandler=processing_exception_handler/;
859859
%Docstring
860860
Processes an individual input ``feature`` from the source. Algorithms should implement their
861861
logic in this method for performing the algorithm's operation (e.g. replacing the feature's

‎src/core/processing/qgsprocessingalgorithm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ class CORE_EXPORT QgsProcessingFeatureBasedAlgorithm : public QgsProcessingAlgor
888888
* can break valid model execution - so use with extreme caution, and consider using
889889
* \a feedback to instead report non-fatal processing failures for features instead.
890890
*/
891-
virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0;
891+
virtual QgsFeatureList processFeature( const QgsFeature &feature, QgsProcessingContext &context, QgsProcessingFeedback *feedback ) = 0 SIP_VIRTUALERRORHANDLER( processing_exception_handler );
892892

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

0 commit comments

Comments
 (0)
Please sign in to comment.