New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Server] Print an error message, on project load error #8006
Conversation
src/server/qgsconfigcache.cpp
Outdated
@@ -47,6 +47,10 @@ const QgsProject *QgsConfigCache::project( const QString &path ) | |||
mProjectCache.insert( path, prj.release() ); | |||
mFileSystemWatcher.addPath( path ); | |||
} | |||
else | |||
{ | |||
QgsMessageLog::logMessage( "Error, project file '" + path + "': " + prj->error(), QStringLiteral( "Server" ), Qgis::Critical ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better translate this and use a template based approach.
tr( "Error when loading project file '%1': %2 " ).arg( ... )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any translated log message on QGIS server, and I think that better to keep it like it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that error messages should be translated, but not OGC exceptions (defined as is in the standard).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK..., Than I will do it :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Now for the fun part, arg()
takes multiple parameters and is more performant in this case so it's good practice to use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks, updated :-)
bd45a05
to
8f45f20
Compare
8f45f20
to
5f33137
Compare
Checklist
fixes #11111
in the commit message next to the description[FEATURE]
in the commit message[needs-docs]
in the commit message and contain sufficient information in the commit message to be documentedscripts/prepare-commit.sh
script before each commit