// Type of return value\r
\r
ReturnTypeTag returnTypeTag;\r
+ MethodFlags contextFlag = MethodFlags.ExcludeLogicalCallContext;\r
\r
if (resp.Exception != null) {\r
returnTypeTag = ReturnTypeTag.Exception | ReturnTypeTag.Null;\r
- info = new object[] {resp.Exception};\r
internalProperties = MethodReturnDictionary.InternalExceptionKeys;\r
+ infoArrayLength = 1;\r
}\r
else if (resp.ReturnValue == null) {\r
returnTypeTag = ReturnTypeTag.Null;\r
\r
// Message flags\r
\r
- MethodFlags contextFlag;\r
MethodFlags formatFlag;\r
\r
- if ((resp.LogicalCallContext != null) && resp.LogicalCallContext.HasInfo && ((returnTypeTag & ReturnTypeTag.Exception) == 0)) \r
+ if ((resp.LogicalCallContext != null) && resp.LogicalCallContext.HasInfo) \r
{\r
contextFlag = MethodFlags.IncludesLogicalCallContext;\r
- infoArrayLength++;\r
+ infoArrayLength++;
}\r
- else\r
- contextFlag = MethodFlags.ExcludeLogicalCallContext;\r
\r
if (resp.Properties.Count > internalProperties.Length && ((returnTypeTag & ReturnTypeTag.Exception) == 0))\r
{\r
{\r
object[] infoArray = new object[infoArrayLength];\r
int n = 0;\r
-\r
+
+ if ((returnTypeTag & ReturnTypeTag.Exception) != 0)
+ infoArray[n++] = resp.Exception;\r
+ \r
if (formatFlag == MethodFlags.ArgumentsInMultiArray)\r
infoArray[n++] = resp.Args;\r
\r
object[] msgInfo = (object[]) result;\r
\r
if ((typeTag & ReturnTypeTag.Exception) > 0) {\r
- exception = (Exception) msgInfo[0];\r
+ exception = (Exception) msgInfo[0];
+ if (hasContextInfo) callContext = (LogicalCallContext)msgInfo[1];\r
}\r
else if ((flags & MethodFlags.NoArguments) > 0 || (flags & MethodFlags.PrimitiveArguments) > 0) {\r
int n = 0;\r