Throw QgsProcessingException when a python exception occurs while running an alg

This commit is contained in:
Nyall Dawson 2017-06-22 20:50:52 +10:00
parent 958ca1075c
commit a4f23fd1a4
2 changed files with 2 additions and 2 deletions

View File

@ -292,7 +292,7 @@ class QgsProcessingAlgorithm
%End
virtual QVariantMap processAlgorithm( const QVariantMap &parameters,
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const = 0;
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const = 0 /VirtualErrorHandler=processing_exception_handler/;
%Docstring
Runs the algorithm using the specified ``parameters``. Algorithms should implement
their custom processing logic here.

View File

@ -300,7 +300,7 @@ class CORE_EXPORT QgsProcessingAlgorithm
* values such as statistical calculations.
*/
virtual QVariantMap processAlgorithm( const QVariantMap &parameters,
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const = 0;
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const = 0 SIP_VIRTUALERRORHANDLER( processing_exception_handler );
/**
* Evaluates the parameter with matching \a name to a static string value.