From 397f289493c6006d2d453efdcc1fc9c9f6a70f27 Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 28 Mar 2012 00:13:25 +0000 Subject: [PATCH] Lua - savestate.registersave/load - show exception message on error --- BizHawk.MultiClient/LuaImplementation.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/LuaImplementation.cs b/BizHawk.MultiClient/LuaImplementation.cs index c685257c18..70cbc32359 100644 --- a/BizHawk.MultiClient/LuaImplementation.cs +++ b/BizHawk.MultiClient/LuaImplementation.cs @@ -33,9 +33,10 @@ namespace BizHawk.MultiClient { savestate_registersavefunc.Call(); } - catch + catch (SystemException e) { - Global.MainForm.LuaConsole1.WriteToOutputWindow("error running function attached by lua function savestate.registersave"); + Global.MainForm.LuaConsole1.WriteToOutputWindow("error running function attached by lua function savestate.registersave" + + "\nError message: " + e.Message); } } } @@ -48,9 +49,10 @@ namespace BizHawk.MultiClient { savestate_registerloadfunc.Call(); } - catch + catch (SystemException e) { - Global.MainForm.LuaConsole1.WriteToOutputWindow("error running function attached by lua function savestate.registerload"); + Global.MainForm.LuaConsole1.WriteToOutputWindow("error running function attached by lua function savestate.registerload" + + "\nError message: " + e.Message); } } }