change exception messages/codes to getUnits function