From 2c2a0473f4ea8b933c73e912034aba9212ba0686 Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 23 Nov 2018 19:31:40 +0100 Subject: [PATCH] feat(client): throw when we don't have required resources files --- src/client.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client.cpp b/src/client.cpp index 945e38ad..1d7464c7 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -41,6 +41,9 @@ waybar::Client::Client(int argc, char* argv[]) "/etc/xdg/waybar/style.css", "./resources/style.css", }); + if (css_file.empty() || config_file.empty()) { + throw std::runtime_error("Missing required resources files"); + } std::cout << "Resources files: " + config_file + ", " + css_file << std::endl; }