~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/Mono.Debugging/Mono.Debugging.Evaluation/ExceptionInfoSource.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
                        if (withTimeout) {
61
61
                                messageValue = ctx.Adapter.CreateObjectValueAsync ("Message", ObjectValueFlags.None, delegate {
62
62
                                        ValueReference mref = exception.GetChild ("Message", options);
63
 
                                        if (mref != null)
64
 
                                                return mref.CreateObjectValue (false, options);
 
63
                                        if (mref != null) {
 
64
                                                string val = (string) mref.ObjectValue;
 
65
                                                return ObjectValue.CreatePrimitive (null, new ObjectPath ("Message"), "System.String", new EvaluationResult (val), ObjectValueFlags.Literal);
 
66
                                        }
65
67
                                        else
66
68
                                                return ObjectValue.CreateUnknown ("Message");
67
69
                                });
68
70
                        } else {
69
71
                                ValueReference mref = exception.GetChild ("Message", options);
70
 
                                if (mref != null)
71
 
                                        messageValue = mref.CreateObjectValue (false, options);
 
72
                                if (mref != null) {
 
73
                                        string val = (string) mref.ObjectValue;
 
74
                                        messageValue = ObjectValue.CreatePrimitive (null, new ObjectPath ("Message"), "System.String", new EvaluationResult (val), ObjectValueFlags.Literal);
 
75
                                }
72
76
                        }
73
77
                        if (messageValue == null)
74
78
                                messageValue = ObjectValue.CreateUnknown ("Message");
83
87
                                childExceptionValue = ctx.Adapter.CreateObjectValueAsync ("InnerException", ObjectValueFlags.None, delegate {
84
88
                                        ValueReference inner = exception.GetChild ("InnerException", options);
85
89
                                        if (inner != null && !ctx.Adapter.IsNull (ctx, inner.Value)) {
86
 
                                                Console.WriteLine ("pp got child:" + type);
 
90
                                                //Console.WriteLine ("pp got child:" + type);
87
91
                                                ExceptionInfoSource innerSource = new ExceptionInfoSource (ctx, inner);
88
92
                                                ObjectValue res = innerSource.CreateObjectValue (false, options);
89
93
                                                return res;
94
98
                        } else {
95
99
                                ValueReference inner = exception.GetChild ("InnerException", options);
96
100
                                if (inner != null && !ctx.Adapter.IsNull (ctx, inner.Value)) {
97
 
                                        Console.WriteLine ("pp got child:" + type);
 
101
                                        //Console.WriteLine ("pp got child:" + type);
98
102
                                        ExceptionInfoSource innerSource = new ExceptionInfoSource (ctx, inner);
99
103
                                        childExceptionValue = innerSource.CreateObjectValue (false, options);
100
104
                                        childExceptionValue.Name = "InnerException";