Added get_errors functon to the db class.