diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-19 19:11:58 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-19 19:11:58 -0400 |
commit | e6c696fa6b0bfe5ef013e1179765ce1dcb071c38 (patch) | |
tree | 6ebd183fa44bac23f14f21fdb9faa6fd56a7b61f /src/SMAPI/Framework/Deprecations/DeprecationManager.cs | |
parent | 889004f1eba31aa3a5069e1dcbe79896d05720b0 (diff) | |
download | SMAPI-e6c696fa6b0bfe5ef013e1179765ce1dcb071c38.tar.gz SMAPI-e6c696fa6b0bfe5ef013e1179765ce1dcb071c38.tar.bz2 SMAPI-e6c696fa6b0bfe5ef013e1179765ce1dcb071c38.zip |
add immutable stack trace to cache stack info
Diffstat (limited to 'src/SMAPI/Framework/Deprecations/DeprecationManager.cs')
-rw-r--r-- | src/SMAPI/Framework/Deprecations/DeprecationManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/Deprecations/DeprecationManager.cs b/src/SMAPI/Framework/Deprecations/DeprecationManager.cs index da17ce7e..84ce2132 100644 --- a/src/SMAPI/Framework/Deprecations/DeprecationManager.cs +++ b/src/SMAPI/Framework/Deprecations/DeprecationManager.cs @@ -63,7 +63,7 @@ namespace StardewModdingAPI.Framework.Deprecations return; // queue warning - var stack = new StackTrace(skipFrames: 1); // skip this method + ImmutableStackTrace stack = ImmutableStackTrace.Get(skipFrames: 1); this.QueuedWarnings.Add(new DeprecationWarning(source, nounPhrase, version, severity, stack)); } @@ -134,7 +134,7 @@ namespace StardewModdingAPI.Framework.Deprecations /// <summary>Get the simplest stack trace which shows where in the mod the deprecated code was called from.</summary> /// <param name="stack">The stack trace.</param> /// <param name="mod">The mod for which to show a stack trace.</param> - private string GetSimplifiedStackTrace(StackTrace stack, IModMetadata? mod) + private string GetSimplifiedStackTrace(ImmutableStackTrace stack, IModMetadata? mod) { // unknown mod, show entire stack trace if (mod == null) |