Merge pull request #274 from blueyed/spawn-warn-for-errors

Call `warn` in case of errors in luaA_spawn
This commit is contained in:
Emmanuel Lepage Vallée 2015-06-22 16:28:42 -04:00
commit 7d430cf51a
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);