diff options
Diffstat (limited to 'src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs')
-rw-r--r-- | src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs index e3b2d2ce62..abb5a8f656 100644 --- a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs +++ b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs @@ -11,29 +11,34 @@ ** =============================================================================*/ -namespace System.Runtime.CompilerServices { - using System; - using System.Runtime.Serialization; - using System.Runtime.Remoting; - using System.Diagnostics.Contracts; - +using System; +using System.Runtime.Serialization; +using System.Runtime.Remoting; +using System.Diagnostics.Contracts; + +namespace System.Runtime.CompilerServices +{ [Serializable] public sealed class RuntimeWrappedException : Exception { private RuntimeWrappedException(Object thrownObject) - : base(Environment.GetResourceString("RuntimeWrappedException")) { + : base(Environment.GetResourceString("RuntimeWrappedException")) + { SetErrorCode(System.__HResults.COR_E_RUNTIMEWRAPPED); m_wrappedException = thrownObject; } - - public Object WrappedException { + + public Object WrappedException + { get { return m_wrappedException; } } private Object m_wrappedException; - public override void GetObjectData(SerializationInfo info, StreamingContext context) { - if (info==null) { + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + if (info == null) + { throw new ArgumentNullException(nameof(info)); } Contract.EndContractBlock(); @@ -42,7 +47,8 @@ namespace System.Runtime.CompilerServices { } internal RuntimeWrappedException(SerializationInfo info, StreamingContext context) - : base(info, context) { + : base(info, context) + { m_wrappedException = info.GetValue("WrappedException", typeof(Object)); } } |