Added try/catch handling and database logging/uid1 error message on thrown Exception.