mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Provide better error message for unknown screen names
The screen object can be indexed by strings to find a screen via some RANDR output name. However, if a string is used which does not correspond to a known output, the code just falls through to a function which will complain "string provided, userdata expected". This commit provides a slightly more useful error message instead. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
09bffcd432
commit
ab559a6f36
1 changed files with 1 additions and 0 deletions
|
@ -1029,6 +1029,7 @@ luaA_screen_module_index(lua_State *L)
|
|||
foreach(output, (*screen)->outputs)
|
||||
if(A_STREQ(output->name, name))
|
||||
return luaA_object_push(L, *screen);
|
||||
luaL_error(L, "Unknown screen output name: %s", name);
|
||||
}
|
||||
|
||||
return luaA_object_push(L, luaA_checkscreen(L, 2));
|
||||
|
|
Loading…
Reference in a new issue