Replaced deprecated error.add_to_base to display error