summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-04-28 15:56:07 +0100
committerGitHub <noreply@github.com>2026-04-28 15:56:07 +0100
commit98fbbafef78057c818fb02b15c27e38ad2f5b5bc (patch)
treec62aa1eae704e7595d58f7edeb3804e8bfd0099d /src/debug
parentd4c6ff434c5c7aa66bc7c28e5ce336d2a694bfcc (diff)
config/errors: Report and categorize errors properly for actions (#14192)
Makes all errors categorized, some not displayed, some displayed. All errors can be obtained after hl.dispatch()
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/HyprCtl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index bb575ce5..540a28e2 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -1258,7 +1258,7 @@ static std::string evalRequest(eHyprCtlOutputFormat format, std::string request)
auto err = luaMgr->eval(code);
if (err)
- return std::format("error: {}", *err);
+ return *err;
return "ok";
}
@@ -1269,7 +1269,7 @@ static std::string dispatchRequest(eHyprCtlOutputFormat format, std::string in)
if (Config::mgr()->type() == Config::CONFIG_LUA) {
// For lua, this is just a wrapper for `eval("hl.dispatch(in)")
- std::string evalStr = std::format("hl.dispatch({})", in);
+ std::string evalStr = std::format("return hl.dispatch({})", in);
auto luaMgr = dynamicPointerCast<Config::Lua::CConfigManager>(WP<Config::IConfigManager>(Config::mgr()));
auto ret = luaMgr->eval(evalStr).value_or("ok");