Skip to content

Commit

Permalink
Merge pull request #33858 from rldhont/backport-33849-to-release-3_10
Browse files Browse the repository at this point in the history
[Backport Release-3_10][Server] Add project path to bad layers message
  • Loading branch information
rldhont committed Jan 17, 2020
2 parents c9dfe1b + 5598c8d commit 1194f64
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/server/qgsconfigcache.cpp
Expand Up @@ -68,8 +68,9 @@ const QgsProject *QgsConfigCache::project( const QString &path )
}
if ( !unrestrictedBadLayers.isEmpty() )
{
const QString errorMsg = QStringLiteral( "Layer(s) %1 not valid" ).arg( unrestrictedBadLayers.join( ',' ) );
QgsMessageLog::logMessage( errorMsg, QStringLiteral( "Server" ), Qgis::Critical );
QgsMessageLog::logMessage(
QStringLiteral( "Error, Layer(s) %1 not valid in project %2" ).arg( unrestrictedBadLayers.join( QStringLiteral( ", " ) ), path ),
QStringLiteral( "Server" ), Qgis::Critical );
throw QgsServerException( QStringLiteral( "Layer(s) not valid" ) );
}
}
Expand All @@ -79,7 +80,7 @@ const QgsProject *QgsConfigCache::project( const QString &path )
else
{
QgsMessageLog::logMessage(
tr( "Error when loading project file '%1': %2 " ).arg( path, prj->error() ),
QStringLiteral( "Error when loading project file '%1': %2 " ).arg( path, prj->error() ),
QStringLiteral( "Server" ), Qgis::Critical );
}
}
Expand Down

0 comments on commit 1194f64

Please sign in to comment.