Skip to content

Commit

Permalink
Print repr() of OperationalError.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtgay committed Jun 10, 2013
1 parent f661a7c commit 5ae3e40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ def run_migrations_online():
with context.begin_transaction():
context.run_migrations()
trans.commit()
except sa.exc.OperationalError:
except sa.exc.OperationalError as e:
print "SQLite does not allow one of these operations. Rolling back."
print "The exception was:"
print repr(e)
trans.rollback()
finally:
connection.close()
Expand Down

0 comments on commit 5ae3e40

Please sign in to comment.