Clean up output a bit

soprefactor
Melanie 2010-05-19 03:48:03 +01:00
parent 20642f2f21
commit 0c209a469b
3 changed files with 12 additions and 9 deletions

View File

@ -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;");
}

View File

@ -43,8 +43,6 @@ namespace OpenSim.Data.MySQL
/// </summary>
public class MySqlMigration : Migration
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public MySqlMigration()
: base()
{
@ -75,9 +73,7 @@ namespace OpenSim.Data.MySQL
scr.Query = sql;
scr.Error += delegate(object sender, MySqlScriptErrorEventArgs args)
{
m_log.ErrorFormat("[MySQL MIGRATION]: Error {0}", args.Exception.Message);
m_log.ErrorFormat("[MySQL MIGRATION]: In SQL: {0}", args.StatementText);
throw args.Exception;
throw new Exception(sql);
};
scr.Execute();
}

View File

@ -66,7 +66,7 @@ namespace OpenSim.Framework.Console
}
else
{
System.Console.Write(loggingMessage);
System.Console.WriteLine(loggingMessage);
}
}
catch (Exception e)