Skip to content
Permalink
Browse files

Add error reporting

  • Loading branch information
m-kuhn committed Mar 10, 2019
1 parent bb60f4c commit 3c4b9d6164858db193303d01e55befa30f53e6a2
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/core/qgspallabeling.cpp
@@ -59,6 +59,7 @@
#include "qgssymbollayerutils.h"
#include "qgsmaptopixelgeometrysimplifier.h"
#include "qgscurvepolygon.h"
#include "qgsmessagelog.h"
#include <QMessageBox>

// TODO: Move to qgis.h?
@@ -1227,9 +1228,14 @@ void QgsPalLayerSettings::registerFeature( const QgsFeature &f, QgsRenderContext
{
mGeometryGeneratorExpression = QgsExpression( geometryGenerator );
mGeometryGeneratorExpression.prepare( &context.expressionContext() );
if ( mGeometryGeneratorExpression.hasParserError() )
QgsMessageLog::logMessage( QObject::tr( "Labeling" ), mGeometryGeneratorExpression.parserErrorString() );
}
context.expressionContext().setFeature( feature );
const QgsGeometry geometry = mGeometryGeneratorExpression.evaluate( &context.expressionContext() ).value<QgsGeometry>();
if ( mGeometryGeneratorExpression.hasEvalError() )
QgsMessageLog::logMessage( QObject::tr( "Labeling" ), mGeometryGeneratorExpression.evalErrorString() );

feature.setGeometry( geometry );
}

0 comments on commit 3c4b9d6

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