[System.Private.CoreLib] Fixes build
authorMarek Safar <marek.safar@gmail.com>
Sat, 5 Oct 2019 07:16:00 +0000 (09:16 +0200)
committerMarek Safar <marek.safar@gmail.com>
Sat, 5 Oct 2019 12:09:54 +0000 (14:09 +0200)
Commit migrated from https://github.com/mono/mono/commit/fce0e64de9a96694d99f14069c7655ad429af01b

src/mono/netcore/System.Private.CoreLib/src/System/Exception.cs

index 34b4e5d..9f9d504 100644 (file)
@@ -92,6 +92,16 @@ namespace System
                        _stackTraceString = null;
                }
 
+               [StackTraceHidden]
+               internal void SetCurrentStackTrace ()
+               {
+                       // Check to see if the exception already has a stack set in it.
+                       if (_stackTraceString != null)
+                               ThrowHelper.ThrowInvalidOperationException();
+
+                       // TODO: Store the current stack trace into this exception
+               }
+
                string? CreateSourceName ()
                {
                        var st = new StackTrace (this, fNeedFileInfo: false);