Fix BHI1007 errors in NLua

"Don't use target-typed new for throw expressions"
doesn't include rebuilt assembly because it should be identical IL
modulo timestamps
one of these was `Exception` and got stripped, one was checked-in as
implicitly-typed
see 5fd840e14 and 29c15adbb
This commit is contained in:
YoshiRulz 2024-10-04 23:51:26 +10:00
parent f99b8fa518
commit 5f23ee44b6
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 2 additions and 2 deletions

View File

@ -282,7 +282,7 @@ namespace NLua.Native
return nativeMethods;
}
throw new("Could not load native lua methods");
throw new Exception("Could not load native lua methods");
});
internal static LuaNativeMethods GetNativeMethods()

View File

@ -25,7 +25,7 @@ namespace NLua
var main = luaState.MainThread;
if (!translators.TryGetValue(main, out translator))
{
throw new("Invalid luaState, couldn't find ObjectTranslator");
throw new Exception("Invalid luaState, couldn't find ObjectTranslator");
}
}