fix implicit lua number to .net conversion

fix .net exceptions not halting the running script
fix inconsistency with stdout and lua console printing errors, both should end in a newline now
print the inner exception of a lua exception (i.e. the .net extension) if possible
This commit is contained in:
CasualPokePlayer 2022-12-06 02:52:57 -08:00
parent eb00019c86
commit bc79664461
3 changed files with 8 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -58,8 +58,14 @@ namespace BizHawk.Client.Common
}
catch (NLua.Exceptions.LuaException ex)
{
Console.WriteLine(ex);
DefaultLogger(ex.ToString());
var exStr = ex.ToString() + '\n';
if (ex.InnerException is not null)
{
exStr += ex.InnerException.ToString() + '\n';
}
Console.Write(exStr);
DefaultLogger(exStr);
exceptionCallback?.Invoke();
}
finally