Skip to content

Commit

Permalink
refs #7408
Browse files Browse the repository at this point in the history
Fix error reporting when the filename expression is invalid
  • Loading branch information
Hugo Mercier committed Mar 21, 2013
1 parent 12f0947 commit aa43c92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/composer/qgsatlascomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void QgsAtlasComposition::prepareForFeature( size_t featureI )
if ( !mSingleFile && mFilenamePattern.size() > 0 )
{
QgsExpression::setSpecialColumn( "$feature", QVariant(( int )featureI + 1 ) );
QVariant filenameRes = mFilenameExpr->evaluate( &mCurrentFeature );
QVariant filenameRes = mFilenameExpr->evaluate( &mCurrentFeature, mCoverageLayer->pendingFields() );
if ( mFilenameExpr->hasEvalError() )
{
throw std::runtime_error( tr( "Filename eval error: %1" ).arg( mFilenameExpr->evalErrorString() ).toLocal8Bit().data() );
Expand Down

0 comments on commit aa43c92

Please sign in to comment.