Skip to content
Snippets Groups Projects
Commit 8fcb886a authored by jochen@chromium.org's avatar jochen@chromium.org
Browse files

Start counting at 1 for extension API validation.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6153002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70774 0039d316-1c4b-4281-b951-d872f2087c98
parent 9989c9bb
No related merge requests found
......@@ -53,7 +53,7 @@ var chrome = chrome || {};
if (validator.errors.length == 0)
continue;
var message = "Invalid value for argument " + i + ". ";
var message = "Invalid value for argument " + (i + 1) + ". ";
for (var i = 0, err; err = validator.errors[i]; i++) {
if (err.path) {
message += "Property '" + err.path + "': ";
......@@ -67,7 +67,7 @@ var chrome = chrome || {};
throw new Error(message);
} else if (!schemas[i].optional) {
throw new Error("Parameter " + i + " is required.");
throw new Error("Parameter " + (i + 1) + " is required.");
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment