@@ -60,6 +60,7 @@ public ObjectValue CreateObjectValue (bool withTimeout, EvaluationOptions option
60
60
excInstance . Name = "Instance" ;
61
61
62
62
ObjectValue messageValue = null ;
63
+ ObjectValue helpLinkValue = null ;
63
64
var exceptionType = ctx . Adapter . GetValueType ( ctx , Exception . Value ) ;
64
65
65
66
// Get the message
@@ -87,6 +88,31 @@ public ObjectValue CreateObjectValue (bool withTimeout, EvaluationOptions option
87
88
88
89
messageValue . Name = "Message" ;
89
90
91
+ // Get the help link
92
+
93
+ if ( withTimeout ) {
94
+ helpLinkValue = ctx . Adapter . CreateObjectValueAsync ( "HelpLink" , ObjectValueFlags . None , delegate {
95
+ var mref = ctx . Adapter . GetMember ( ctx , Exception , exceptionType , Exception . Value , "HelpLink" ) ;
96
+ if ( mref != null ) {
97
+ string val = ( string ) mref . ObjectValue ;
98
+ return ObjectValue . CreatePrimitive ( null , new ObjectPath ( "HelpLink" ) , "string" , new EvaluationResult ( val ) , ObjectValueFlags . Literal ) ;
99
+ }
100
+
101
+ return ObjectValue . CreateUnknown ( "HelpLink" ) ;
102
+ } ) ;
103
+ } else {
104
+ var mref = ctx . Adapter . GetMember ( ctx , Exception , exceptionType , Exception . Value , "HelpLink" ) ;
105
+ if ( mref != null ) {
106
+ string val = ( string ) mref . ObjectValue ;
107
+ helpLinkValue = ObjectValue . CreatePrimitive ( null , new ObjectPath ( "HelpLink" ) , "string" , new EvaluationResult ( val ) , ObjectValueFlags . Literal ) ;
108
+ }
109
+ }
110
+
111
+ if ( helpLinkValue == null )
112
+ helpLinkValue = ObjectValue . CreateUnknown ( "HelpLink" ) ;
113
+
114
+ helpLinkValue . Name = "HelpLink" ;
115
+
90
116
// Inner exception
91
117
92
118
ObjectValue childExceptionValue = null ;
@@ -160,7 +186,7 @@ public ObjectValue CreateObjectValue (bool withTimeout, EvaluationOptions option
160
186
stackTraceValue = GetStackTrace ( stackTrace . ObjectValue as string ) ;
161
187
}
162
188
163
- var children = new ObjectValue [ ] { excInstance , messageValue , stackTraceValue , childExceptionValue , childExceptionsValue } ;
189
+ var children = new ObjectValue [ ] { excInstance , messageValue , helpLinkValue , stackTraceValue , childExceptionValue , childExceptionsValue } ;
164
190
165
191
return ObjectValue . CreateObject ( null , new ObjectPath ( "InnerException" ) , type , "" , ObjectValueFlags . None , children ) ;
166
192
}
0 commit comments