mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1155658: Rename "illegal argument" error to "invalid argument"
r=chmanchester --HG-- extra : rebase_source : b49c8bcaa30b470ae372182a83b6085ae94ddb7f
This commit is contained in:
parent
cb82383649
commit
5ade32492f
@ -2308,7 +2308,7 @@ GeckoDriver.prototype.sendKeysToElement = function(cmd, resp) {
|
||||
let {id, value} = cmd.parameters;
|
||||
|
||||
if (!value) {
|
||||
throw new IllegalArgumentError(`Expected character sequence: ${value}`);
|
||||
throw new InvalidArgumentError(`Expected character sequence: ${value}`);
|
||||
}
|
||||
|
||||
switch (this.context) {
|
||||
@ -2341,7 +2341,7 @@ GeckoDriver.prototype.sendKeysToElement = function(cmd, resp) {
|
||||
try {
|
||||
file = new File(val);
|
||||
} catch (e) {
|
||||
err = new IllegalArgumentError(`File not found: ${val}`);
|
||||
err = new InvalidArgumentError(`File not found: ${val}`);
|
||||
}
|
||||
fs.push(file);
|
||||
el.mozSetFileArray(fs);
|
||||
|
@ -11,7 +11,7 @@ const errors = [
|
||||
"ElementNotVisibleError",
|
||||
"FrameSendFailureError",
|
||||
"FrameSendNotInitializedError",
|
||||
"IllegalArgumentError",
|
||||
"InvalidArgumentError",
|
||||
"InvalidElementStateError",
|
||||
"InvalidSelectorError",
|
||||
"InvalidSessionIdError",
|
||||
@ -171,12 +171,12 @@ this.FrameSendNotInitializedError = function(frame) {
|
||||
};
|
||||
FrameSendNotInitializedError.prototype = Object.create(WebDriverError.prototype);
|
||||
|
||||
this.IllegalArgumentError = function(msg) {
|
||||
this.InvalidArgumentError = function(msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "IllegalArgumentError";
|
||||
this.status = "illegal argument";
|
||||
this.name = "InvalidArgumentError";
|
||||
this.status = "invalid argument";
|
||||
};
|
||||
IllegalArgumentError.prototype = Object.create(WebDriverError.prototype);
|
||||
InvalidArgumentError.prototype = Object.create(WebDriverError.prototype);
|
||||
|
||||
this.InvalidElementStateError = function(msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
|
@ -1562,7 +1562,7 @@ function sendKeysToElement(msg) {
|
||||
try {
|
||||
file = new File(p);
|
||||
} catch (e) {
|
||||
let err = new IllegalArgumentError(`File not found: ${val}`);
|
||||
let err = new InvalidArgumentError(`File not found: ${val}`);
|
||||
sendError(err, command_id);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user