Change CommandError to ValueError for :tab-move.

This should never happen.
This commit is contained in:
Florian Bruhin 2015-11-26 16:37:29 +01:00
parent bc28a168cc
commit 5a95cfdc7a

View File

@ -921,9 +921,8 @@ class CommandDispatcher:
except ValueError:
raise cmdexc.CommandError("Count must be given for relative "
"moving!")
else:
raise cmdexc.CommandError("Invalid direction '{}'!".format(
direction))
else: # pragma: no cover
raise ValueError("Invalid direction '{}'!".format(direction))
if not 0 <= new_idx < self._count():
raise cmdexc.CommandError("Can't move tab to position {}!".format(
new_idx))