Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alexrp@xamarin.com>2017-07-22 18:15:11 +0300
committerAlex Rønne Petersen <alexrp@xamarin.com>2017-07-22 18:15:56 +0300
commitaebb8f0d8505a44efac08823f070347bd55122c3 (patch)
tree432c20169ccdb87ceb433ecd734d8cc7cdeafc6b /mcs/class/Mono.Profiler.Log
parent16309a75610232cb0368bcbb99725c2516578949 (diff)
[Mono.Profiler.Log] Catch SecurityException for missing icalls.
This is the exception that is thrown on .NET because icalls are not allowed in non-GAC assemblies.
Diffstat (limited to 'mcs/class/Mono.Profiler.Log')
-rw-r--r--mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogProfiler.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogProfiler.cs b/mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogProfiler.cs
index 289b1803613..688a84b9864 100644
--- a/mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogProfiler.cs
+++ b/mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogProfiler.cs
@@ -5,6 +5,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using System.Security;
namespace Mono.Profiler.Log {
@@ -20,7 +21,7 @@ namespace Mono.Profiler.Log {
try {
GetMaxStackTraceFrames ();
return (bool) (_attached = true);
- } catch (MissingMethodException) {
+ } catch (Exception e) when (e is MissingMethodException || e is SecurityException) {
return (bool) (_attached = false);
}
}