Skip to content

Commit a4f23fd

Browse files
committedJun 23, 2017
Throw QgsProcessingException when a python exception occurs while running an alg
1 parent 958ca10 commit a4f23fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎python/core/processing/qgsprocessingalgorithm.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class QgsProcessingAlgorithm
292292
%End
293293

294294
virtual QVariantMap processAlgorithm( const QVariantMap &parameters,
295-
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const = 0;
295+
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const = 0 /VirtualErrorHandler=processing_exception_handler/;
296296
%Docstring
297297
Runs the algorithm using the specified ``parameters``. Algorithms should implement
298298
their custom processing logic here.

‎src/core/processing/qgsprocessingalgorithm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class CORE_EXPORT QgsProcessingAlgorithm
300300
* values such as statistical calculations.
301301
*/
302302
virtual QVariantMap processAlgorithm( const QVariantMap &parameters,
303-
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const = 0;
303+
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const = 0 SIP_VIRTUALERRORHANDLER( processing_exception_handler );
304304

305305
/**
306306
* Evaluates the parameter with matching \a name to a static string value.

0 commit comments

Comments
 (0)
Please sign in to comment.