mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 848688 - Have a consistent naming for error message. r=allstars.chh
This commit is contained in:
parent
3a517af32a
commit
79d40c9fc8
@ -1003,7 +1003,7 @@ RILContentHelper.prototype = {
|
|||||||
case "RIL:CallError":
|
case "RIL:CallError":
|
||||||
this._deliverEvent("_telephonyListeners",
|
this._deliverEvent("_telephonyListeners",
|
||||||
"notifyError",
|
"notifyError",
|
||||||
[msg.json.callIndex, msg.json.error]);
|
[msg.json.callIndex, msg.json.errorMsg]);
|
||||||
break;
|
break;
|
||||||
case "RIL:VoicemailNotification":
|
case "RIL:VoicemailNotification":
|
||||||
this.handleVoicemailNotification(msg.json);
|
this.handleVoicemailNotification(msg.json);
|
||||||
@ -1062,7 +1062,7 @@ RILContentHelper.prototype = {
|
|||||||
case "RIL:DataError":
|
case "RIL:DataError":
|
||||||
this.updateConnectionInfo(msg.json, this.rilContext.dataConnectionInfo);
|
this.updateConnectionInfo(msg.json, this.rilContext.dataConnectionInfo);
|
||||||
this._deliverEvent("_mobileConnectionListeners", "notifyDataError",
|
this._deliverEvent("_mobileConnectionListeners", "notifyDataError",
|
||||||
[msg.json.error]);
|
[msg.json.errorMsg]);
|
||||||
break;
|
break;
|
||||||
case "RIL:GetCallForwardingOption":
|
case "RIL:GetCallForwardingOption":
|
||||||
this.handleGetCallForwardingOption(msg.json);
|
this.handleGetCallForwardingOption(msg.json);
|
||||||
@ -1117,9 +1117,9 @@ RILContentHelper.prototype = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message.error) {
|
if (message.errorMsg) {
|
||||||
debug("Received error from getAvailableNetworks: " + message.error);
|
debug("Received error from getAvailableNetworks: " + message.errorMsg);
|
||||||
Services.DOMRequest.fireError(request, message.error);
|
Services.DOMRequest.fireError(request, message.errorMsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1138,32 +1138,32 @@ RILContentHelper.prototype = {
|
|||||||
this._selectingNetwork = null;
|
this._selectingNetwork = null;
|
||||||
this.networkSelectionMode = mode;
|
this.networkSelectionMode = mode;
|
||||||
|
|
||||||
if (message.error) {
|
if (message.errorMsg) {
|
||||||
this.fireRequestError(message.requestId, message.error);
|
this.fireRequestError(message.requestId, message.errorMsg);
|
||||||
} else {
|
} else {
|
||||||
this.fireRequestSuccess(message.requestId, null);
|
this.fireRequestSuccess(message.requestId, null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleIccOpenChannel: function handleIccOpenChannel(message) {
|
handleIccOpenChannel: function handleIccOpenChannel(message) {
|
||||||
if (message.error) {
|
if (message.errorMsg) {
|
||||||
this.fireRequestError(message.requestId, message.error);
|
this.fireRequestError(message.requestId, message.errorMsg);
|
||||||
} else {
|
} else {
|
||||||
this.fireRequestSuccess(message.requestId, message.channel);
|
this.fireRequestSuccess(message.requestId, message.channel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleIccCloseChannel: function handleIccCloseChannel(message) {
|
handleIccCloseChannel: function handleIccCloseChannel(message) {
|
||||||
if (message.error) {
|
if (message.errorMsg) {
|
||||||
this.fireRequestError(message.requestId, message.error);
|
this.fireRequestError(message.requestId, message.errorMsg);
|
||||||
} else {
|
} else {
|
||||||
this.fireRequestSuccess(message.requestId, null);
|
this.fireRequestSuccess(message.requestId, null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleIccExchangeAPDU: function handleIccExchangeAPDU(message) {
|
handleIccExchangeAPDU: function handleIccExchangeAPDU(message) {
|
||||||
if (message.error) {
|
if (message.errorMsg) {
|
||||||
this.fireRequestError(message.requestId, message.error);
|
this.fireRequestError(message.requestId, message.errorMsg);
|
||||||
} else {
|
} else {
|
||||||
var result = [message.sw1, message.sw2, message.simResponse];
|
var result = [message.sw1, message.sw2, message.simResponse];
|
||||||
this.fireRequestSuccess(message.requestId, result);
|
this.fireRequestSuccess(message.requestId, result);
|
||||||
|
@ -1674,7 +1674,7 @@ RadioInterfaceLayer.prototype = {
|
|||||||
delete this._sentSmsEnvelopes[message.envelopeId];
|
delete this._sentSmsEnvelopes[message.envelopeId];
|
||||||
|
|
||||||
let error = Ci.nsISmsRequest.UNKNOWN_ERROR;
|
let error = Ci.nsISmsRequest.UNKNOWN_ERROR;
|
||||||
switch (message.error) {
|
switch (message.errorMsg) {
|
||||||
case RIL.ERROR_RADIO_NOT_AVAILABLE:
|
case RIL.ERROR_RADIO_NOT_AVAILABLE:
|
||||||
error = Ci.nsISmsRequest.NO_SIGNAL_ERROR;
|
error = Ci.nsISmsRequest.NO_SIGNAL_ERROR;
|
||||||
break;
|
break;
|
||||||
@ -2063,7 +2063,7 @@ RadioInterfaceLayer.prototype = {
|
|||||||
if (!PhoneNumberUtils.isViablePhoneNumber(number)) {
|
if (!PhoneNumberUtils.isViablePhoneNumber(number)) {
|
||||||
this.handleCallError({
|
this.handleCallError({
|
||||||
callIndex: -1,
|
callIndex: -1,
|
||||||
error: RIL.RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[RIL.CALL_FAIL_UNOBTAINABLE_NUMBER]
|
errorMsg: RIL.RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[RIL.CALL_FAIL_UNOBTAINABLE_NUMBER]
|
||||||
});
|
});
|
||||||
debug("Number '" + number + "' doesn't seem to be a viable number. Drop.");
|
debug("Number '" + number + "' doesn't seem to be a viable number. Drop.");
|
||||||
return;
|
return;
|
||||||
|
@ -1611,7 +1611,7 @@ let RIL = {
|
|||||||
// Notify error in establishing the call with an invalid number.
|
// Notify error in establishing the call with an invalid number.
|
||||||
options.callIndex = -1;
|
options.callIndex = -1;
|
||||||
options.rilMessageType = "callError";
|
options.rilMessageType = "callError";
|
||||||
options.error =
|
options.errorMsg =
|
||||||
RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_UNOBTAINABLE_NUMBER];
|
RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_UNOBTAINABLE_NUMBER];
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
return;
|
return;
|
||||||
@ -3227,9 +3227,9 @@ let RIL = {
|
|||||||
_sendDataCallError: function _sendDataCallError(message, errorCode) {
|
_sendDataCallError: function _sendDataCallError(message, errorCode) {
|
||||||
message.rilMessageType = "datacallerror";
|
message.rilMessageType = "datacallerror";
|
||||||
if (errorCode == ERROR_GENERIC_FAILURE) {
|
if (errorCode == ERROR_GENERIC_FAILURE) {
|
||||||
message.error = RIL_ERROR_TO_GECKO_ERROR[errorCode];
|
message.errorMsg = RIL_ERROR_TO_GECKO_ERROR[errorCode];
|
||||||
} else {
|
} else {
|
||||||
message.error = RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[errorCode];
|
message.errorMsg = RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[errorCode];
|
||||||
}
|
}
|
||||||
this.sendDOMMessage(message);
|
this.sendDOMMessage(message);
|
||||||
},
|
},
|
||||||
@ -3832,7 +3832,7 @@ let RIL = {
|
|||||||
this.sendDOMMessage({
|
this.sendDOMMessage({
|
||||||
rilMessageType: "sms-send-failed",
|
rilMessageType: "sms-send-failed",
|
||||||
envelopeId: options.envelopeId,
|
envelopeId: options.envelopeId,
|
||||||
error: options.rilRequestError,
|
errorMsg: options.rilRequestError,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4444,7 +4444,7 @@ RIL[REQUEST_LAST_CALL_FAIL_CAUSE] = function REQUEST_LAST_CALL_FAIL_CAUSE(length
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
options.rilMessageType = "callError";
|
options.rilMessageType = "callError";
|
||||||
options.error = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause];
|
options.errorMsg = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[failCause];
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4730,7 +4730,7 @@ RIL[REQUEST_SET_FACILITY_LOCK] = function REQUEST_SET_FACILITY_LOCK(length, opti
|
|||||||
RIL[REQUEST_CHANGE_BARRING_PASSWORD] = null;
|
RIL[REQUEST_CHANGE_BARRING_PASSWORD] = null;
|
||||||
RIL[REQUEST_SIM_OPEN_CHANNEL] = function REQUEST_SIM_OPEN_CHANNEL(length, options) {
|
RIL[REQUEST_SIM_OPEN_CHANNEL] = function REQUEST_SIM_OPEN_CHANNEL(length, options) {
|
||||||
if (options.rilRequestError) {
|
if (options.rilRequestError) {
|
||||||
options.error = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4796,7 +4796,7 @@ RIL[REQUEST_QUERY_NETWORK_SELECTION_MODE] = function REQUEST_QUERY_NETWORK_SELEC
|
|||||||
};
|
};
|
||||||
RIL[REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = function REQUEST_SET_NETWORK_SELECTION_AUTOMATIC(length, options) {
|
RIL[REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = function REQUEST_SET_NETWORK_SELECTION_AUTOMATIC(length, options) {
|
||||||
if (options.rilRequestError) {
|
if (options.rilRequestError) {
|
||||||
options.error = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4805,7 +4805,7 @@ RIL[REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = function REQUEST_SET_NETWORK_SELE
|
|||||||
};
|
};
|
||||||
RIL[REQUEST_SET_NETWORK_SELECTION_MANUAL] = function REQUEST_SET_NETWORK_SELECTION_MANUAL(length, options) {
|
RIL[REQUEST_SET_NETWORK_SELECTION_MANUAL] = function REQUEST_SET_NETWORK_SELECTION_MANUAL(length, options) {
|
||||||
if (options.rilRequestError) {
|
if (options.rilRequestError) {
|
||||||
options.error = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4814,7 +4814,7 @@ RIL[REQUEST_SET_NETWORK_SELECTION_MANUAL] = function REQUEST_SET_NETWORK_SELECTI
|
|||||||
};
|
};
|
||||||
RIL[REQUEST_QUERY_AVAILABLE_NETWORKS] = function REQUEST_QUERY_AVAILABLE_NETWORKS(length, options) {
|
RIL[REQUEST_QUERY_AVAILABLE_NETWORKS] = function REQUEST_QUERY_AVAILABLE_NETWORKS(length, options) {
|
||||||
if (options.rilRequestError) {
|
if (options.rilRequestError) {
|
||||||
options.error = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
|
||||||
this.sendDOMMessage(options);
|
this.sendDOMMessage(options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user