Replace remaining legacy error_message calls in member class with exceptions.