@tanishqaggarwal raised a concern that some of the errors messages produced by failed state field/parameter casts are not very informative:
auto *field_ptr = dynamic_cast<StateField<T> *>(this);
if (!field_ptr)
throw std::runtime_error("Invalid field type in call to 'cast'.");
It would be far superior if this message reported the name of the field the cast failed on. To implement this, we need to tie a string name to the field/parameter itself as opposed to the state entry. This will involve a non-trivial amount of refactoring but shouldn't affect existing model implementations.
@tanishqaggarwal raised a concern that some of the errors messages produced by failed state field/parameter casts are not very informative:
It would be far superior if this message reported the name of the field the cast failed on. To implement this, we need to tie a string name to the field/parameter itself as opposed to the state entry. This will involve a non-trivial amount of refactoring but shouldn't affect existing model implementations.