From 3c334aac29998d1812d1dfff51270683596f310c Mon Sep 17 00:00:00 2001 From: Almamu Date: Thu, 15 May 2025 22:28:23 +0200 Subject: [PATCH] chore: better error reporting after fix for #300 --- src/WallpaperEngine/Application/CApplicationContext.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/WallpaperEngine/Application/CApplicationContext.cpp b/src/WallpaperEngine/Application/CApplicationContext.cpp index e1d8365..34a8ef3 100644 --- a/src/WallpaperEngine/Application/CApplicationContext.cpp +++ b/src/WallpaperEngine/Application/CApplicationContext.cpp @@ -257,6 +257,10 @@ CApplicationContext::CApplicationContext (int argc, char* argv []) : program.parse_known_args (argc, argv); + if (this->settings.general.defaultBackground.empty ()) { + throw std::runtime_error ("No default background specified. Either --bg/-b or must be specified"); + } + this->settings.audio.volume = std::max(0, std::min (this->settings.audio.volume, 128)); this->settings.screenshot.delay = std::max (0, std::min (this->settings.screenshot.delay, 5));