allow public access to add_error function