done the error_inserter in cpp