Copy constructor added for database exceptions.