Please do not throw at run time. An `edm::LogError` is preferred.
Where is `dim` determined? Is it possibly known at c'tor time already?
Beside that, it is not used in the function. So, why should the function break due to it?