add exception message in case of invalid values