summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-03-19 22:46:59 -0400
committerKris Maglione <maglione.k@gmail.com>2011-03-19 22:46:59 -0400
commitbe367b9ca19a791fc4f00d2bb5b11cb29921d504 (patch)
tree6922cfd54d1256bd42eb741b89402e542181a5cd
parent2a48b8bc863309e467f86a88d9737796c2b0c075 (diff)
downloadpentadactyl-be367b9ca19a791fc4f00d2bb5b11cb29921d504.tar.gz
Fix cryptic error message with certain :set args.
--HG-- extra : rebase_source : f555e2cb98bea80fd1090cae6199371f0ca997ed
-rw-r--r--common/modules/bookmarkcache.jsm2
-rw-r--r--common/modules/options.jsm1
2 files changed, 3 insertions, 0 deletions
diff --git a/common/modules/bookmarkcache.jsm b/common/modules/bookmarkcache.jsm
index afaa56b9..8f12b6a4 100644
--- a/common/modules/bookmarkcache.jsm
+++ b/common/modules/bookmarkcache.jsm
@@ -30,6 +30,8 @@ update(Bookmark.prototype, {
})
Bookmark.setter = function (key, func) this.prototype.__defineSetter__(key, func);
Bookmark.setter("url", function (val) {
+ if (isString(val))
+ val = util.newURI(val);
let tags = this.tags;
this.tags = null;
services.bookmarks.changeBookmarkURI(this.id, val);
diff --git a/common/modules/options.jsm b/common/modules/options.jsm
index 3672f7eb..e22715e0 100644
--- a/common/modules/options.jsm
+++ b/common/modules/options.jsm
@@ -1082,6 +1082,7 @@ var Options = Module("options", {
let opt = modules.options.parseOpt(arg, modifiers);
util.assert(opt, _("command.set.errorParsing", arg));
+ util.assert(!opt.error, _("command.set.errorParsing", opt.error));
let option = opt.option;
util.assert(option != null || opt.all, _("command.set.unknownOption", opt.name));