Skip to content

Commit

Permalink
Fail algorithm when sink cannot be flushed
Browse files Browse the repository at this point in the history
Fixes #59237
  • Loading branch information
nyalldawson committed Oct 28, 2024
1 parent 3c80c5c commit d4d302d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/analysis/processing/qgsalgorithmextractbyexpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ QVariantMap QgsExtractByExpressionAlgorithm::processAlgorithm( const QVariantMap
}
}

if ( matchingSink && !matchingSink->flushBuffer() )
{
throw QgsProcessingException( matchingSink->lastError() );
}
if ( nonMatchingSink && !nonMatchingSink->flushBuffer() )
{
throw QgsProcessingException( nonMatchingSink->lastError() );
}

QVariantMap outputs;
outputs.insert( QStringLiteral( "OUTPUT" ), matchingSinkId );
Expand Down

0 comments on commit d4d302d

Please sign in to comment.