
9 Mar
2010
9 Mar
'10
3:23 p.m.
It seems the way program_options deals with validation errors was changed in 1.42. Constructor of validation_error now takes kind_t and option name and value. Before 1.42 it was possible to specify what exactly was wrong with the option value in the constructor of validation_error. Now I see no options but to subclass validation_error. Was this change intentional? Also, documentation need to be fixed to reflect these changes. More precisely, the following line in "Custom Validators" section will lead to compilation error:
throw validation_error("invalid value");
-- Best regards, Alexander Fokin, ru.elric@gmail.com.