fix(launch): Fix several launch failure conditions (exceptions thrown in child.wait, and boost::split_unix) (#4390)
This commit is contained in:
committed by
GitHub
parent
1d6d916b7a
commit
852dee0a68
@@ -40,6 +40,8 @@ using namespace std::literals;
|
||||
|
||||
namespace nvhttp {
|
||||
|
||||
static constexpr std::string_view EMPTY_PROPERTY_TREE_ERROR_MSG = "Property tree is empty. Probably, control flow got interrupted by an unexpected C++ exception. This is a bug in Sunshine. Moonlight-qt will report Malformed XML (missing root element)."sv;
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
namespace pt = boost::property_tree;
|
||||
|
||||
@@ -816,6 +818,10 @@ namespace nvhttp {
|
||||
auto g = util::fail_guard([&]() {
|
||||
std::ostringstream data;
|
||||
|
||||
if (tree.empty()) {
|
||||
BOOST_LOG(error) << EMPTY_PROPERTY_TREE_ERROR_MSG;
|
||||
}
|
||||
|
||||
pt::write_xml(data, tree);
|
||||
response->write(data.str());
|
||||
response->close_connection_after_response = true;
|
||||
@@ -922,6 +928,10 @@ namespace nvhttp {
|
||||
auto g = util::fail_guard([&]() {
|
||||
std::ostringstream data;
|
||||
|
||||
if (tree.empty()) {
|
||||
BOOST_LOG(error) << EMPTY_PROPERTY_TREE_ERROR_MSG;
|
||||
}
|
||||
|
||||
pt::write_xml(data, tree);
|
||||
response->write(data.str());
|
||||
response->close_connection_after_response = true;
|
||||
|
||||
Reference in New Issue
Block a user