Added DatabaseException with global catch next to switch statement.