Throw an exception if an illegal capsule size is used.