Skip to content

Commit

Permalink
Proper logging: before the exception body was lost, now it's logged.
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzhulart committed Dec 20, 2016
1 parent 8eba0ab commit 0657baa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,7 @@ public ObjectValue[] GetAllChildren (EvaluationOptions options)
ConnectCallbacks (parentFrame, cs);
children.AddRange (cs);
} catch (Exception ex) {
if (parentFrame != null)
parentFrame.DebuggerSession.OnDebuggerOutput (true, ex.ToString ());
DebuggerLoggingService.LogError ("Exception in GetAllChildren()", ex);
children.Add (CreateFatalError ("", ex.Message, ObjectValueFlags.ReadOnly));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ public virtual ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObj
values.Add (oval);
}
} catch (Exception ex) {
ctx.WriteDebuggerError (ex);
DebuggerLoggingService.LogError ("Exception in GetObjectValueChildren()", ex);
values.Add (ObjectValue.CreateError (null, new ObjectPath (val.Name), GetDisplayTypeName (GetTypeName (ctx, val.Type)), ex.Message, val.Flags));
}
}
Expand Down
5 changes: 3 additions & 2 deletions Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ public ObjectValue CreateObjectValue (EvaluationOptions options)
return DC.ObjectValue.CreateEvaluationException (Context, Context.ExpressionValueSource, new ObjectPath (Name), ex);
} catch (EvaluatorException ex) {
return DC.ObjectValue.CreateError (this, new ObjectPath (Name), "", ex.Message, Flags);
} catch (Exception ex) {
Context.WriteDebuggerError (ex);
}
catch (Exception ex) {
DebuggerLoggingService.LogError ("Exception in CreateObjectValue()", ex);
return DC.ObjectValue.CreateUnknown (Name);
}
}
Expand Down

0 comments on commit 0657baa

Please sign in to comment.