From 0c209a469b54a52ac7d54a7bddd2bdcf02a80522 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 19 May 2010 03:48:03 +0100 Subject: Clean up output a bit --- OpenSim/Data/Migration.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data/Migration.cs') diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 987eab5..e54296d 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -146,7 +146,14 @@ namespace OpenSim.Data foreach (string sql in script) { cmd.CommandText = sql; - cmd.ExecuteNonQuery(); + try + { + cmd.ExecuteNonQuery(); + } + catch + { + throw new Exception(sql); + } } } } @@ -199,8 +206,8 @@ namespace OpenSim.Data } catch (Exception e) { - m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", kvp.Value.ToString()); - m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message); + m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message); + m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing."); ExecuteScript("ROLLBACK;"); } -- cgit v1.1