mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 07:28:00 +01:00
Restore some of Doug's vim-compatible :source error messages. Also, don't crap out so easily on errors.
This commit is contained in:
@@ -141,6 +141,11 @@ const Command = Class("Command", {
|
||||
let self = this;
|
||||
modifiers = modifiers || {};
|
||||
|
||||
if (args.count != null && !this.count)
|
||||
throw FailedAssertion("E481: No range allowed");
|
||||
if (args.bang && !this.bang)
|
||||
throw FailedAssertion("E477: No ! allowed");
|
||||
|
||||
dactyl.trapErrors(function exec(command) {
|
||||
this.action(args, modifiers);
|
||||
}, this);
|
||||
|
||||
Reference in New Issue
Block a user