This patch fixes error handling when system setting get/set
property fails.
delete m._reply_id;
delete m._error;
delete _callbacks[_reply_id];
- if (_error === 0) {
+ if (!_error) {
handler[0](m._file);
} else if (handler[1]) {
- handler[1](new tizen.WebAPIError(_error));
+ handler[1](new tizen.WebAPIError(tizen.WebAPIException.UNKNOWN_ERR));
}
delete m._file;
} else {
o["_reply_id"] = picojson::value(reply_id);
if (value)
o["_file"] = picojson::value(value);
- o["_error"] = picojson::value(static_cast<double>(ret));
+ o["_error"] = picojson::value(ret != 0);
picojson::value v(o);
PostMessage(v.serialize().c_str());