Skip to content

Commit 9809e72

Browse files
committed
Proper logging: before the exception body was lost, now it's logged.
1 parent 3e78933 commit 9809e72

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,7 @@ public ObjectValue[] GetAllChildren (EvaluationOptions options)
541541
ConnectCallbacks (parentFrame, cs);
542542
children.AddRange (cs);
543543
} catch (Exception ex) {
544-
if (parentFrame != null)
545-
parentFrame.DebuggerSession.OnDebuggerOutput (true, ex.ToString ());
544+
DebuggerLoggingService.LogError ("Exception in GetAllChildren()", ex);
546545
children.Add (CreateFatalError ("", ex.Message, ObjectValueFlags.ReadOnly));
547546
}
548547
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ public virtual ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObj
590590
values.Add (oval);
591591
}
592592
} catch (Exception ex) {
593-
ctx.WriteDebuggerError (ex);
593+
DebuggerLoggingService.LogError ("Exception in GetObjectValueChildren()", ex);
594594
values.Add (ObjectValue.CreateError (null, new ObjectPath (val.Name), GetDisplayTypeName (GetTypeName (ctx, val.Type)), ex.Message, val.Flags));
595595
}
596596
}

Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ public ObjectValue CreateObjectValue (EvaluationOptions options)
110110
return DC.ObjectValue.CreateEvaluationException (Context, Context.ExpressionValueSource, new ObjectPath (Name), ex);
111111
} catch (EvaluatorException ex) {
112112
return DC.ObjectValue.CreateError (this, new ObjectPath (Name), "", ex.Message, Flags);
113-
} catch (Exception ex) {
114-
Context.WriteDebuggerError (ex);
113+
}
114+
catch (Exception ex) {
115+
DebuggerLoggingService.LogError ("Exception in CreateObjectValue()", ex);
115116
return DC.ObjectValue.CreateUnknown (Name);
116117
}
117118
}

0 commit comments

Comments
 (0)