[banshee] [Hyena] Better exception and sqlite error logging
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Hyena] Better exception and sqlite error logging
- Date: Wed, 17 Mar 2010 20:10:19 +0000 (UTC)
commit 56efd0ee2c9332e930fe1f09ca9a242938ea6478
Author: Gabriel Burt <gabriel burt gmail com>
Date: Wed Mar 17 12:59:10 2010 -0700
[Hyena] Better exception and sqlite error logging
.../Hyena/Hyena.Data.Sqlite/HyenaSqliteCommand.cs | 2 +-
src/Libraries/Hyena/Hyena/Log.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteCommand.cs b/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
index a550d0a..9b0a386 100644
--- a/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
+++ b/src/Libraries/Hyena/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
@@ -120,7 +120,7 @@ namespace Hyena.Data.Sqlite
Log.DebugFormat ("Executed in {0}ms {1}", execution_ms, sql_command.CommandText);
}
} catch (Exception e) {
- Log.DebugFormat ("Exception executing command: {0}", sql_command.CommandText);
+ Log.Exception (sql_command.CommandText, e);
execution_exception = e;
}
}
diff --git a/src/Libraries/Hyena/Hyena/Log.cs b/src/Libraries/Hyena/Hyena/Log.cs
index 6dea20c..0b06b12 100644
--- a/src/Libraries/Hyena/Hyena/Log.cs
+++ b/src/Libraries/Hyena/Hyena/Log.cs
@@ -394,7 +394,7 @@ namespace Hyena
while (exception_chain.Count > 0) {
e = exception_chain.Pop ();
- builder.AppendFormat ("{0} (in `{1}')", e.Message, e.Source).AppendLine ();
+ builder.AppendFormat ("{0}: {1} (in `{2}')", e.GetType (), e.Message, e.Source).AppendLine ();
builder.Append (e.StackTrace);
if (exception_chain.Count > 0) {
builder.AppendLine ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]