I know I can add an error to a field as follows:
Account someAccount = [select id, name from Account limit 1];
someAccount.name.addError('Bad Name');
How can I do that if the field name is only available as a String?
Account someAccount = [select id, name from Account limit 1];
String someField = 'name';
// if I could only do something like the below
someAccount.addError(someField, 'Bad Name');