Call `warn` in case of errors in luaA_spawn

This is useful to have, as it might indicate a missing program etc.
This commit is contained in:
Daniel Hahler 2015-06-22 14:01:16 +02:00
parent 32b584258b
commit ccb6843144
1 changed files with 2 additions and 0 deletions

View File

@ -362,6 +362,7 @@ luaA_spawn(lua_State *L)
g_strfreev(argv); g_strfreev(argv);
/* push error on stack */ /* push error on stack */
lua_pushfstring(L, "spawn: parse error: %s", error->message); lua_pushfstring(L, "spawn: parse error: %s", error->message);
warn("%s", lua_tostring(L, -1));
g_error_free(error); g_error_free(error);
return 1; return 1;
} }
@ -388,6 +389,7 @@ luaA_spawn(lua_State *L)
{ {
/* push error on stack */ /* push error on stack */
lua_pushstring(L, error->message); lua_pushstring(L, error->message);
warn("%s", lua_tostring(L, -1));
g_error_free(error); g_error_free(error);
if(context) if(context)
sn_launcher_context_complete(context); sn_launcher_context_complete(context);