Updated Database wrapper to use DatabaseExceptions