Skip to content
Permalink
Browse files

Better error reporting

  • Loading branch information
m-kuhn committed Apr 9, 2018
1 parent 080c580 commit ae1ea918014418e2e884abe82e7ffa64adf2b396
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/analysis/processing/qgsalgorithmfilter.cpp
@@ -90,14 +90,14 @@ QVariantMap QgsFilterAlgorithm::processAlgorithm( const QVariantMap &parameters,
{
std::unique_ptr< QgsProcessingFeatureSource > source( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
if ( !source )
return QVariantMap();
throw QgsProcessingException( QObject::tr( "Could not open input layer or feature source for parameter INPUT." ) );

QgsExpressionContext expressionContext = createExpressionContext( parameters, context, source.get() );
for ( Output *output : qgis::as_const( mOutputs ) )
{
output->sink.reset( parameterAsSink( parameters, output->name, context, output->destinationIdentifier, source->fields(), source->wkbType(), source->sourceCrs() ) );
if ( !output->sink )
throw QgsProcessingException( QObject::tr( "Could not create feature sink for output %1." ).arg( output->name ) );
throw QgsProcessingException( QObject::tr( "Could not create output layer or feature sink for output %1." ).arg( output->name ) );
output->expression.prepare( &expressionContext );
}

0 comments on commit ae1ea91

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