Skip to content

Commit

Permalink
Log statement being run when an error occurs - chucknorris#66
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Sep 7, 2012
1 parent 7af9fec commit 3902f16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions product/roundhouse/migrators/DefaultDatabaseMigrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ public bool run_sql(string sql_to_run, string script_name, bool run_this_script_
}
catch (Exception ex)
{
Log.bound_to(this).log_an_error_event_containing("Error executing file '{0}': statement running was '{1}'", script_name, sql_statement);
database.rollback();

record_script_in_scripts_run_errors_table(script_name, sql_to_run, sql_statement, ex.Message, repository_version, repository_path);
database.close_connection();
throw;
Expand Down

0 comments on commit 3902f16

Please sign in to comment.