Wrap an eval block around the main loop for issue #16.

Change the database connection to automatically raise errors, so I can
remove all the checks for error states. The transaction is rolled back
in the main loop, so I don't have to write that code for every
transaction.