hyprland/backend: throw runtime_error instead of log

Allows us to disable modules entirely when socket connection isn't
working. This is similar to how sway handles their socket connections
disabling modules. This supports a single waybar config for multiple
IPCs.
This commit is contained in:
Austin Horstman
2024-07-16 14:53:54 -05:00
parent 3f61df4e66
commit 4295faa7c4
3 changed files with 11 additions and 14 deletions

View File

@ -52,10 +52,8 @@ TEST_CASE_METHOD(IPCTestFixture, "XDGRuntimeDirExistsNoHyprDir", "[getSocketFold
REQUIRE(actualPath == expectedPath);
}
TEST_CASE_METHOD(IPCMock, "getSocket1JsonReply handles empty response", "[getSocket1JsonReply]") {
TEST_CASE_METHOD(IPCTestFixture, "getSocket1Reply throws on no socket", "[getSocket1Reply]") {
std::string request = "test_request";
Json::Value jsonResponse = getSocket1JsonReply(request);
REQUIRE(jsonResponse.isNull());
CHECK_THROWS(getSocket1Reply(request));
}