throw exception when required info not satisfied.