diff options
Diffstat (limited to 'mcs/class/corlib/System.Security/CodeAccessPermission.cs')
-rw-r--r-- | mcs/class/corlib/System.Security/CodeAccessPermission.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.Security/CodeAccessPermission.cs b/mcs/class/corlib/System.Security/CodeAccessPermission.cs index 47d9ed0a657..c97d080a587 100644 --- a/mcs/class/corlib/System.Security/CodeAccessPermission.cs +++ b/mcs/class/corlib/System.Security/CodeAccessPermission.cs @@ -391,11 +391,15 @@ namespace System.Security { internal static void ThrowSecurityException (object demanded, string message, SecurityFrame frame, SecurityAction action, IPermission failed) { +#if NET_2_1 + throw new SecurityException (message); +#else Assembly a = frame.Assembly; throw new SecurityException (Locale.GetText (message), a.UnprotectedGetName (), a.GrantedPermissionSet, a.DeniedPermissionSet, frame.Method, action, demanded, failed, a.UnprotectedGetEvidence ()); +#endif } } } |