Add some code to database - handle exceptions in db.