SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Improve reflection error handling for TargetParameterCountException

InkDragon opened this issue ยท 2 comments

commented

https://smapi.io/log/g0U5Z4Eq

00:13:59 ERROR SMAPI Critical thread exception: System.Reflection.TargetParameterCountException: Parameter count mismatch. at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at StardewModdingAPI.Framework.Reflection.ReflectedMethod.Invoke[TValue](Object[] arguments) in C:\source_Stardew\SMAPI\src\SMAPI\Framework\Reflection\ReflectedMethod.cs:line 66

breaks all in game functions, unable to move or access menus

commented

That's a mod bug (per our later Discord discussion), but SMAPI should be handling it better.

commented

Improved the error-handling in develop for the upcoming SMAPI 3.0.2.