MessageFormatter.cs: Corrected some bugs that affected serialization of exceptions
authorLluis Sanchez <lluis@novell.com>
Wed, 5 Feb 2003 01:21:43 +0000 (01:21 -0000)
committerLluis Sanchez <lluis@novell.com>
Wed, 5 Feb 2003 01:21:43 +0000 (01:21 -0000)
svn path=/trunk/mcs/; revision=11222

mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/MessageFormatter.cs

index cf3c7f1ea5d392302c813e6a1e2a53db70b817e5..6f7531831de738001ac0d40fe7d46f457511ba85 100755 (executable)
@@ -1,3 +1,7 @@
+2003-02-04  Lluis Sanchez Gual <lluis@ideary.com>
+
+    * MessageFormatter.cs: Corrected some bugs that affected serialization of exceptions
+
 2003-02-04  Lluis Sanchez Gual <lluis@ideary.com>
 
     * MessageFormatter.cs: Implemented serialization of message properties.
index 5aa0b9997b48cf26cb7cd4401643c5fbc0d985a0..764c1a680dea4c0c4a980d2abe057c27469440f5 100644 (file)
@@ -161,7 +161,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
                        else\r
                                contextFlag = MethodFlags.ExcludeLogicalCallContext;\r
 \r
-                       if (resp.Properties.Count > internalProperties.Length)\r
+                       if (resp.Properties.Count > internalProperties.Length && ((returnTypeTag & ReturnTypeTag.Exception) == 0))\r
                        {\r
                                extraProperties = GetExtraProperties (resp.Properties, internalProperties);\r
                                infoArrayLength++;\r
@@ -378,7 +378,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
                                if ((typeTag & ReturnTypeTag.Exception) > 0) {\r
                                        exception = (Exception) msgInfo[0];\r
                                }\r
-                               if ((flags & MethodFlags.NoArguments) > 0 || (flags & MethodFlags.PrimitiveArguments) > 0) {\r
+                               else if ((flags & MethodFlags.NoArguments) > 0 || (flags & MethodFlags.PrimitiveArguments) > 0) {\r
                                        int n = 0;\r
                                        if ((typeTag & ReturnTypeTag.ObjectType) > 0) returnValue = msgInfo [n++];\r
                                        if (hasContextInfo) callContext = (LogicalCallContext)msgInfo[n++];\r