Raise exception if diameter is out of range