Skip to content

Commit 281a9c3

Browse files
committed
Evaluation exception wrapping in CreateObjectValue.
Ignore eval exceptions occured during ToString() calls in type presentation
1 parent ec74adc commit 281a9c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ public ObjectValue CreateObjectValue (EvaluationContext ctx, IObjectValueSource
9191
return CreateObjectValueImpl (ctx, source, path, obj, flags);
9292
} catch (EvaluatorAbortedException ex) {
9393
return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
94+
} catch (EvaluatorExceptionThrownException ex) {
95+
return ObjectValue.CreateEvaluationException (ctx, source, path, ex);
9496
} catch (EvaluatorException ex) {
9597
return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
9698
} catch (Exception ex) {
@@ -1111,6 +1113,8 @@ public virtual object TargetObjectToObject (EvaluationContext ctx, object obj)
11111113
return new EvaluationResult ("{" + CallToString (ctx, obj) + "}");
11121114
} catch (TimeOutException) {
11131115
// ToString() timed out, fall back to default behavior.
1116+
} catch (EvaluatorExceptionThrownException e) {
1117+
// ToString() call thrown exception, fall back to default behavior.
11141118
}
11151119
}
11161120

0 commit comments

Comments
 (0)