properly raise InvalidModeString Exception