use C++ throw methods instead of printf and exit

This commit is contained in:
vaxerski
2022-07-06 16:17:58 +02:00
parent 9655d0c138
commit 0d7a8cca79
3 changed files with 8 additions and 15 deletions

View File

@@ -12,7 +12,7 @@ bool ignoreSudo = false;
int main(int argc, char** argv) {
if (!getenv("XDG_RUNTIME_DIR"))
RIP("XDG_RUNTIME_DIR not set!");
throw std::runtime_error("XDG_RUNTIME_DIR is not set!");
// parse some args
for (int i = 1; i < argc; ++i) {