Show Errors On Lua In The Output Box More Accurately

This commit is contained in:
rolanmen1 2012-03-27 03:34:21 +00:00
parent b7eaa1eaf7
commit 36c4dee7b8
1 changed files with 9 additions and 3 deletions

View File

@ -609,7 +609,7 @@ namespace BizHawk.MultiClient
}
catch (Exception ex)
{
if (ex.ToString().Substring(0, 32) == "LuaInterface.LuaScriptException:")
if (ex.ToString().Substring(0, 32) == "LuaInterface.LuaScriptException:" || ex.ToString().Substring(0, 26) == "LuaInterface.LuaException:")
{
AddText(ex.Message);
}
@ -834,9 +834,15 @@ namespace BizHawk.MultiClient
s.FrameWaiting = result.WaitForFrame;
}
}
catch
catch (Exception ex)
{
MessageBox.Show("");
if (ex.ToString().Substring(0, 32) == "LuaInterface.LuaScriptException:" || ex.ToString().Substring(0, 26) == "LuaInterface.LuaException:")
{
s.Enabled = false;
AddText(ex.Message);
UpdateNumberOfScripts();
}
else MessageBox.Show(ex.ToString());
}
}
}