1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 17:22:26 +01:00

Fix cryptic error message with certain :set args.

--HG--
extra : rebase_source : f555e2cb98bea80fd1090cae6199371f0ca997ed
This commit is contained in:
Kris Maglione
2011-03-19 22:46:59 -04:00
parent 2a48b8bc86
commit be367b9ca1
2 changed files with 3 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ update(Bookmark.prototype, {
}) })
Bookmark.setter = function (key, func) this.prototype.__defineSetter__(key, func); Bookmark.setter = function (key, func) this.prototype.__defineSetter__(key, func);
Bookmark.setter("url", function (val) { Bookmark.setter("url", function (val) {
if (isString(val))
val = util.newURI(val);
let tags = this.tags; let tags = this.tags;
this.tags = null; this.tags = null;
services.bookmarks.changeBookmarkURI(this.id, val); services.bookmarks.changeBookmarkURI(this.id, val);

View File

@@ -1082,6 +1082,7 @@ var Options = Module("options", {
let opt = modules.options.parseOpt(arg, modifiers); let opt = modules.options.parseOpt(arg, modifiers);
util.assert(opt, _("command.set.errorParsing", arg)); util.assert(opt, _("command.set.errorParsing", arg));
util.assert(!opt.error, _("command.set.errorParsing", opt.error));
let option = opt.option; let option = opt.option;
util.assert(option != null || opt.all, _("command.set.unknownOption", opt.name)); util.assert(option != null || opt.all, _("command.set.unknownOption", opt.name));