RuntimeCompatibilityAttribute.WrapNonExceptionThrows Property
.NET Framework (current version)
Gets or sets a value that indicates whether to wrap exceptions that do not derive from the Exception class with a RuntimeWrappedException object.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System.Booleantrue if exceptions that do not derive from the Exception class should appear wrapped with a RuntimeWrappedException object; otherwise, false.
The following code example applies the RuntimeCompatibilityAttribute attribute to an assembly to disable exception wrapping.
using namespace System; using namespace System::Runtime::CompilerServices; [assembly:RuntimeCompatibilityAttribute(WrapNonExceptionThrows = false)]; void run() { Console::WriteLine("The RuntimeCompatibilityAttribute was applied to disable exception wrapping."); } int main() { run(); return 0; }
Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: