gears.object: Give better error messages

It helps a lot to know which signal does not exist. That should make it a lot
easier to look for the "guily" code without having to resort to the backtrace.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2012-10-14 16:58:54 +02:00
parent 77243cd09a
commit 241d582c55
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ end
local function find_signal(obj, name, error_msg)
check(obj)
if not obj._signals[name] then
error("Trying to " .. error_msg .. " non-existent signal")
error("Trying to " .. error_msg .. " non-existent signal '" .. name .. "'")
end
return obj._signals[name]
end