result = LogAndCreateTizenError(AbortError, "Can not find the service type = 1",
("Can not find the service type = 1"));
} else {
- result = service->Launch(
- ConvergenceUtils::GetArg(args, kJSArgumentAppId).to_str().c_str(),
- static_cast<int>(ConvergenceUtils::GetArg(args, kJSCurrentListenerId).get<double>()));
+ std::string id = ConvergenceUtils::GetArg(args, kJSArgumentAppId).to_str();
+ if (id.empty()) {
+ result = LogAndCreateTizenError(InvalidValuesError, "Invalid app id", ("Invalid app id"));
+ } else {
+ result = service->Launch(id.c_str(), static_cast<int>(ConvergenceUtils::GetArg(args, kJSCurrentListenerId).get<double>()));
+ }
}
//only in case of failure call callback