hide throwhelper from stack trace in dotnet 6

This commit is contained in:
atravita-mods 2022-08-17 21:11:47 -04:00 committed by Jesse Plamondon-Willard
parent 0a2a1a08de
commit 627100509c
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
1 changed files with 3 additions and 0 deletions

View File

@ -353,6 +353,9 @@ namespace StardewModdingAPI.Framework.ContentManagers
[DoesNotReturn] [DoesNotReturn]
[DebuggerStepThrough, DebuggerHidden] [DebuggerStepThrough, DebuggerHidden]
[MethodImpl(MethodImplOptions.NoInlining)] [MethodImpl(MethodImplOptions.NoInlining)]
#if NET6_0_OR_GREATER
[StackTraceHidden]
#endif
private void ThrowLoadError(IAssetName assetName, ContentLoadErrorType errorType, string reasonPhrase, Exception? exception = null) private void ThrowLoadError(IAssetName assetName, ContentLoadErrorType errorType, string reasonPhrase, Exception? exception = null)
{ {
throw new SContentLoadException(errorType, $"Failed loading asset '{assetName}' from {this.Name}: {reasonPhrase}", exception); throw new SContentLoadException(errorType, $"Failed loading asset '{assetName}' from {this.Name}: {reasonPhrase}", exception);