mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Improve the error message for the current breakage (#2749)
The tests for naughty are currently broken, because naughty.dbus now uses Gio for interacting with DBus, but the tests still try to use awesome's dbus object. Turn the resulting weird error into something a lot less cryptic. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
9085ed6312
commit
8218c30a84
1 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,14 @@ end
|
|||
|
||||
local rect = {x1 = math.huge ,y1 = math.huge , x2 = -math.huge , y2 = -math.huge}
|
||||
|
||||
if #drawin.get() == 0 then
|
||||
-- The code below would calculate -math.huge - math.huge and end up trying
|
||||
-- to draw something of size -math.huge times -math.huge. Turn this weird
|
||||
-- error into a better error message.
|
||||
error("Got no drawins to draw. "
|
||||
.. "That's not good and would cause errors later on.")
|
||||
end
|
||||
|
||||
-- Get the region with wiboxes
|
||||
for _, d in ipairs(drawin.get()) do
|
||||
local w = d.get_wibox and d:get_wibox() or nil
|
||||
|
|
Loading…
Reference in a new issue