Merge pull request #8087 from Icinga/bugfix/log-cout-permission-error-8086

Display Logmessage if an permission error occurs
This commit is contained in:
Alexander Aleksandrovič Klimov 2020-11-03 17:23:06 +01:00 committed by GitHub
commit 939f4591a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
#include "base/logger.hpp"
#include "remote/httphandler.hpp"
#include "remote/httputility.hpp"
#include "base/singleton.hpp"
@ -112,7 +113,10 @@ void HttpHandler::ProcessRequest(
break;
}
}
} catch (const std::exception&) {
} catch (const std::exception& ex) {
Log(LogWarning, "HttpServerConnection")
<< "Error while processing HTTP request: " << ex.what();
processed = false;
}