Ticket #11404 (new)
Validator Error Messages
Reported by: | Owen Arnold | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Backlog |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: |
Description (last modified by Owen Arnold) (diff)
auto widthVectorValidator = boost::make_shared<CompositeValidator>(); widthVectorValidator->add(boost::make_shared<ArrayBoundedValidator<int> >(0, 100)); widthVectorValidator->add(boost::make_shared<MandatoryValidator<int > >()); // incorrect // widthVectorValidator->add(boost::make_shared<MandatoryValidator<std::vector<int> > >()); // correct declareProperty(new ArrayProperty<int>( "WidthVector", widthVectorValidator , Direction::Input), "Width vector. Either specify the width in n-pixels for each dimension, or provide a single entry (n-pixels) for all dimensions." );
now do
Algorithm alg; alg.setChild(true); alg.initialize(); std::vector<int> widthVector(1, 1); alg.setProperty("WidthVector", widthVector); // Crashes out
This last line crashes out with "Value was not of expected type." from TypedValidator, but the error was with the declaration of the MandatoryValidator. Would be better if the isValid message reflected that.
Change History
Note: See
TracTickets for help on using
tickets.