Branch: refs/heads/master
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/7e44ee49653c...053ce00c8f8f
Commit: 053ce00c8f8f307de1a197076fd54f0023cc10a2
Author: Cody Russell <[email protected]> (bratsche)
Date: 2013-10-10 18:23:51 GMT
URL: https://github.com/mono/monodevelop/commit/053ce00c8f8f307de1a197076fd54f0023cc10a2
[Core] Log{Internal,Critical,Fatal}Error now Log(LogLevel.Error) in addition to ReportUnhandledException.
Changed paths:
M main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/BackgroundParser.cs
M main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/SubviewAttachmentHandler.cs
M main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetRuntime.cs
M main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs
M main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs
M main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
Modified: main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/RazorEditorParserFixed/BackgroundParser.cs
===================================================================
@@ -437,8 +437,7 @@ private void WorkerLoop()
}
catch (Exception ex)
{
- MonoDevelop.Core.LoggingService.LogError ("Internal error in Razor parser", ex);
- MonoDevelop.Core.LoggingService.ReportUnhandledException (ex, false);
+ MonoDevelop.Core.LoggingService.LogInternalError ("Internal error in Razor parser", ex);
}
finally
{
Modified: main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/SubviewAttachmentHandler.cs
===================================================================
@@ -79,7 +79,7 @@ void HandleDocumentChanged (object sender, EventArgs e)
// If a user is hitting this, it will show a dialog box every time they
// switch to a document or open a document, so suppress the crash dialog
// This bug *should* be fixed already, but it's hard to tell.
- LoggingService.ReportUnhandledException (ex, false, true);
+ LoggingService.LogInternalError (ex);
}
}
Modified: main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetRuntime.cs
===================================================================
@@ -388,7 +388,6 @@ void BackgroundInitialize (object state)
try {
RunInitialization ();
} catch (Exception ex) {
- //LogReporting.LogReportingService.ReportUnhandledException (ex, false);
LoggingService.LogFatalError ("Unhandled exception in SystemAssemblyService background initialisation thread.", ex);
} finally {
lock (initEventLock) {
@@ -621,4 +620,4 @@ static TargetFramework ReadTargetFramework (TargetFrameworkMoniker moniker, File
return null;
}
}
-}
\ No newline at end of file
+}
Modified: main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs
===================================================================
@@ -150,17 +150,17 @@ public static void Shutdown ()
RestoreOutputRedirection ();
}
- public static void ReportUnhandledException (Exception ex, bool willShutDown)
+ internal static void ReportUnhandledException (Exception ex, bool willShutDown)
{
ReportUnhandledException (ex, willShutDown, false, null);
}
- public static void ReportUnhandledException (Exception ex, bool willShutDown, bool silently)
+ internal static void ReportUnhandledException (Exception ex, bool willShutDown, bool silently)
{
ReportUnhandledException (ex, willShutDown, silently);
}
- public static void ReportUnhandledException (Exception ex, bool willShutDown, bool silently, string tag)
+ internal static void ReportUnhandledException (Exception ex, bool willShutDown, bool silently, string tag)
{
var tags = new List<string> { tag };
@@ -540,17 +540,30 @@ public static void LogUserError (string message, Exception ex)
public static void LogInternalError (Exception ex)
{
+ if (ex != null) {
+ Log (LogLevel.Error, System.Environment.NewLine + ex.ToString ());
+ }
+
+ ReportUnhandledException (ex, false, false, "internal");
+ }
+
+ public static void LogInternalError (string message, Exception ex)
+ {
+ Log (LogLevel.Error, message + (ex != null? System.Environment.NewLine + ex.ToString () : string.Empty));
+
ReportUnhandledException (ex, false, false, "internal");
}
public static void LogCriticalError (string message, Exception ex)
{
+ Log (LogLevel.Error, message + (ex != null? System.Environment.NewLine + ex.ToString () : string.Empty));
+
ReportUnhandledException (ex, true, false, "critical");
}
public static void LogFatalError (string message, Exception ex)
{
- Log (LogLevel.Fatal, message + (ex != null? System.Environment.NewLine + ex.ToString () : string.Empty));
+ Log (LogLevel.Error, message + (ex != null? System.Environment.NewLine + ex.ToString () : string.Empty));
ReportUnhandledException (ex, true, false, "fatal");
}
Modified: main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs
===================================================================
@@ -198,7 +198,6 @@ static void SetupInstrumentation ()
static void OnLoadError (object s, AddinErrorEventArgs args)
{
string msg = "Add-in error (" + args.AddinId + "): " + args.Message;
- //LogReporting.LogReportingService.ReportUnhandledException (args.Exception, false, true);
LoggingService.LogError (msg, args.Exception);
}
Modified: main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
===================================================================
@@ -502,10 +502,7 @@ void SetupExceptionManager ()
void HandleException (Exception ex, bool willShutdown)
{
// Log the crash to the MonoDevelop.log file first:
- LoggingService.LogError (string.Format ("An unhandled exception has occured. Terminating MonoDevelop? {0}", willShutdown), ex);
-
- // Pass it off to the reporting service now.
- LoggingService.ReportUnhandledException (ex, willShutdown);
+ LoggingService.LogInternalError (string.Format ("An unhandled exception has occured. Terminating MonoDevelop? {0}", willShutdown), ex);
}
/// <summary>SDBM-style hash, bounded to a range of 1000.</summary>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.