Merge pull request #1900 from psychon/invalid-screen-index

Provide better error message for unknown screen names
This commit is contained in:
Emmanuel Lepage Vallée 2017-07-02 08:56:30 -04:00 committed by GitHub
commit 9ace887caa
1 changed files with 1 additions and 0 deletions

View File

@ -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));