- raise WrongArgumentsError(
- u'Command "%s" takes %s %s argument%s, %s given.'
- % (handler.__name__, quant, n_ok, pl, n_bad))
+ e = WrongArgumentsError(handler, u'takes %s %s argument%s, '
+ '%s given' % (quant, n_ok, pl, n_bad))
+ log.debug(u'Dispatcher.dispatch: wrong arguments (%r)', e)
+ raise e