Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Hide post exception stack frames (dotnet/coreclr#14652)
Browse files Browse the repository at this point in the history
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
  • Loading branch information
benaadams authored and dotnet-bot committed Jan 13, 2018
1 parent bcddd05 commit 0b60ad1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Diagnostics\CodeAnalysis\SuppressMessageAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Diagnostics\ConditionalAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Diagnostics\Debug.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Diagnostics\StackTraceHiddenAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\DivideByZeroException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\DllNotFoundException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Double.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace System.Diagnostics
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Struct, Inherited = false)]
internal sealed class StackTraceHiddenAttribute : Attribute
{
public StackTraceHiddenAttribute() { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;

Expand Down Expand Up @@ -54,6 +55,7 @@ internal ConfiguredValueTaskAwaiter(ValueTask<TResult> value, bool continueOnCap
public bool IsCompleted => _value.IsCompleted;

/// <summary>Gets the result of the ValueTask.</summary>
[StackTraceHidden]
public TResult GetResult() =>
_value._task == null ?
_value._result :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;

Expand All @@ -21,6 +22,7 @@ public struct ValueTaskAwaiter<TResult> : ICriticalNotifyCompletion
public bool IsCompleted => _value.IsCompleted;

/// <summary>Gets the result of the ValueTask.</summary>
[StackTraceHidden]
public TResult GetResult() =>
_value._task == null ?
_value._result :
Expand Down

0 comments on commit 0b60ad1

Please sign in to comment.