Skip to content

Commit 1e2d251

Browse files
committed
Catching exceptions during create object value caused by old version of mono runtime
1 parent ccadee5 commit 1e2d251

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Mono.Debugging.Soft/SoftDebuggerAdaptor.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
using System.Threading;
3636

3737
using Mono.Debugger.Soft;
38+
using Mono.Debugging.Backend;
3839
using Mono.Debugging.Evaluation;
3940
using Mono.Debugging.Client;
4041

@@ -1241,6 +1242,16 @@ public override void GetNamespaceContents (EvaluationContext ctx, string namspac
12411242
types.CopyTo (childTypes);
12421243
}
12431244

1245+
protected override ObjectValue CreateObjectValueImpl (EvaluationContext ctx, IObjectValueSource source, ObjectPath path, object obj, ObjectValueFlags flags)
1246+
{
1247+
try {
1248+
return base.CreateObjectValueImpl (ctx, source, path, obj, flags);
1249+
}
1250+
catch (NotSupportedException e) {
1251+
throw new EvaluatorException ("Evaluation failed: {0}", e.Message);
1252+
}
1253+
}
1254+
12441255
protected override IEnumerable<ValueReference> OnGetParameters (EvaluationContext ctx)
12451256
{
12461257
var soft = (SoftEvaluationContext) ctx;

0 commit comments

Comments
 (0)