Throwing PlatformNotSupportedException for ActivationAttributes
authorRama Krishnan Raghupathy <ramarag@microsoft.com>
Sat, 15 Oct 2016 01:01:44 +0000 (18:01 -0700)
committerRama Krishnan Raghupathy <ramarag@microsoft.com>
Sat, 15 Oct 2016 01:06:14 +0000 (18:06 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/997fd848c53d75890a7072ab3f55b4eb6c2e244f

src/coreclr/src/mscorlib/src/System.Private.CoreLib.txt
src/coreclr/src/mscorlib/src/System/Activator.cs

index 0369344..762ee45 100644 (file)
@@ -1405,6 +1405,7 @@ NotSupported_SignalAndWaitSTAThread = SignalAndWait on a STA thread is not suppo
 NotSupported_CreateInstanceWithTypeBuilder = CreateInstance cannot be used with an object of type TypeBuilder.
 NotSupported_NonUrlAttrOnMBR = UrlAttribute is the only attribute supported for MarshalByRefObject.
 NotSupported_ActivAttrOnNonMBR = Activation Attributes are not supported for types not deriving from MarshalByRefObject.
+NotSupported_ActivAttr = Activation Attributes are not supported. 
 NotSupported_ActivForCom = Activation Attributes not supported for COM Objects.
 NotSupported_NoCodepageData = No data is available for encoding {0}. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
 NotSupported_CodePage50229 = The ISO-2022-CN Encoding (Code page 50229) is not supported.
index 274b0e7..48fedc0 100644 (file)
@@ -93,8 +93,10 @@ namespace System {
                     }
                 }
                 else
-#endif                    
                     throw new NotSupportedException(Environment.GetResourceString("NotSupported_ActivAttrOnNonMBR" ));
+#else
+                    throw new PlatformNotSupportedException(Environment.GetResourceString("NotSupported_ActivAttr" ));
+#endif
             }
 
             RuntimeType rt = type.UnderlyingSystemType as RuntimeType;