-
-
Save mhutch/6468258 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/external/nrefactory b/main/external/nrefactory | |
--- a/main/external/nrefactory | |
+++ b/main/external/nrefactory | |
@@ -1 +1 @@ | |
-Subproject commit a87d4cf3c543cde2257fb06e2f7ad15a8d50b375 | |
+Subproject commit a87d4cf3c543cde2257fb06e2f7ad15a8d50b375-dirty | |
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs | |
index e7ec264..b20b9b2 100644 | |
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs | |
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs | |
@@ -46,10 +46,7 @@ using MonoDevelop.Components.Commands; | |
using MonoDevelop.Core; | |
using MonoDevelop.Ide.Gui.Dialogs; | |
using MonoDevelop.Ide.Gui; | |
-using MonoDevelop.Core.Execution; | |
using MonoDevelop.Core.Instrumentation; | |
-using System.Diagnostics; | |
-using MonoDevelop.Projects; | |
using System.Collections.Generic; | |
using MonoDevelop.Core.LogReporting; | |
@@ -497,6 +494,36 @@ namespace MonoDevelop.Ide | |
Xwt.Application.UnhandledException += (sender, e) => { | |
HandleException (e.ErrorException, false); | |
}; | |
+ | |
+ System.Diagnostics.Debug.Listeners.Clear (); | |
+ System.Diagnostics.Debug.Listeners.Add (new AssertLoggingTraceListener ()); | |
+ } | |
+ | |
+ class AssertLoggingTraceListener : System.Diagnostics.TraceListener | |
+ { | |
+ public override void Fail (string message, string detailMessage) | |
+ { | |
+ string msg; | |
+ if (!string.IsNullOrEmpty (detailMessage)) { | |
+ msg = string.Format ("Failed assert: {0} - {1}", message, detailMessage); | |
+ } else { | |
+ msg = string.Format ("Failed assert: {0}", message); | |
+ } | |
+#if DEBUG | |
+ var stackTrace = new System.Diagnostics.StackTrace (1, true); | |
+ LoggingService.LogError (msg + "\n" + stackTrace); | |
+#else | |
+ LoggingService.LogError (msg); | |
+#endif | |
+ } | |
+ | |
+ public override void Write (string message) | |
+ { | |
+ } | |
+ | |
+ public override void WriteLine (string message) | |
+ { | |
+ } | |
} | |
void HandleException (Exception ex, bool willShutdown) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment