[hyena] Better exception and sqlite error logging



commit 74915caf04d7b918caeae48a9d497e05469395bc
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Wed Mar 17 12:59:10 2010 -0700

    Better exception and sqlite error logging

 .../Hyena.Data.Sqlite/HyenaSqliteCommand.cs        |    2 +-
 src/Hyena/Hyena/Log.cs                             |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs b/src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
index a550d0a..9b0a386 100644
--- a/src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs
+++ b/src/Hyena.Data.Sqlite/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/Hyena/Hyena/Log.cs b/src/Hyena/Hyena/Log.cs
index 6dea20c..0b06b12 100644
--- a/src/Hyena/Hyena/Log.cs
+++ b/src/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]