From d1f921cc3905cad6603190173b33cf9835d42a74 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 May 2014 04:06:12 +0200 Subject: [PATCH] Print command name in ArgumentCountException --- qutebrowser/commands/_command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/commands/_command.py b/qutebrowser/commands/_command.py index 660ebf066..cdbe41ff4 100644 --- a/qutebrowser/commands/_command.py +++ b/qutebrowser/commands/_command.py @@ -108,8 +108,8 @@ class Command(QObject): argcnt = '{}-inf'.format(self.nargs[0]) else: argcnt = '{}-{}'.format(self.nargs[0], self.nargs[1]) - raise ArgumentCountError("{} args expected, but got {}".format( - argcnt, len(args))) + raise ArgumentCountError("{}: {} args expected, but got {}".format( + self.name, argcnt, len(args))) def run(self, args=None, count=None): """Run the command.