Skip to content
Permalink
Browse files

Merge pull request #33849 from rldhont/server-add-project-to-bad-laye…

…rs-message

[Server] Add project path to bad layers message
  • Loading branch information
rldhont committed Jan 16, 2020
2 parents 1f44b29 + 87cf08c commit 4478e202dff0595970464d511c6e8919a05b2688
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/server/qgsconfigcache.cpp
@@ -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" ) );
}
}
@@ -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 );
}
}

0 comments on commit 4478e20

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