From: Leandro Lucarella Date: Mon, 8 Oct 2007 16:19:28 +0000 (-0300) Subject: Better error message of wrong arguments in Dispatcher. X-Git-Url: https://git.llucax.com/software/pymin.git/commitdiff_plain/9c49587e49c381c87776243081d2128650ba1715?hp=7012b07c7b88ece1a0a08c53ca5a07c81209d2e6 Better error message of wrong arguments in Dispatcher. --- diff --git a/pymin/dispatcher.py b/pymin/dispatcher.py index 0127d4f..10e7fb8 100644 --- a/pymin/dispatcher.py +++ b/pymin/dispatcher.py @@ -459,7 +459,8 @@ class Dispatcher: pl = '' if n_ok > 1: pl = 's' - raise WrongArgumentsError(u'%s takes %s %s argument%s, %s given' + raise WrongArgumentsError( + u'Command "%s" takes %s %s argument%s, %s given.' % (handler.__name__, quant, n_ok, pl, n_bad)) raise