fix GetApi interface validation errors not naming interface

This commit is contained in:
Jesse Plamondon-Willard 2018-04-19 20:35:16 -04:00
parent 1b527f0b25
commit b346d28d38
2 changed files with 3 additions and 2 deletions

View File

@ -14,6 +14,7 @@
* Dropped some deprecated APIs. * Dropped some deprecated APIs.
* Fixed assets loaded by temporary content managers not being editable. * Fixed assets loaded by temporary content managers not being editable.
* Fixed issue where assets didn't reload correctly when the player switches language. * Fixed issue where assets didn't reload correctly when the player switches language.
* Fixed `helper.ModRegistry.GetApi` interface validation errors not mentioning which interface caused the issue.
* For SMAPI developers: * For SMAPI developers:
* Added more consistent crossplatform handling using a new `EnvironmentUtility`. * Added more consistent crossplatform handling using a new `EnvironmentUtility`.

View File

@ -82,12 +82,12 @@ namespace StardewModdingAPI.Framework.ModHelpers
} }
if (!typeof(TInterface).IsInterface) if (!typeof(TInterface).IsInterface)
{ {
this.Monitor.Log("Tried to map a mod-provided API to a class; must be a public interface.", LogLevel.Error); this.Monitor.Log($"Tried to map a mod-provided API to class '{typeof(TInterface).FullName}'; must be a public interface.", LogLevel.Error);
return null; return null;
} }
if (!typeof(TInterface).IsPublic) if (!typeof(TInterface).IsPublic)
{ {
this.Monitor.Log("Tried to map a mod-provided API to a non-public interface; must be a public interface.", LogLevel.Error); this.Monitor.Log($"Tried to map a mod-provided API to non-public interface '{typeof(TInterface).FullName}'; must be a public interface.", LogLevel.Error);
return null; return null;
} }