From 2d6c7e3adb47787ba7c38c303fd1f528f7d52a13 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 26 Sep 2013 16:44:37 +0200 Subject: frontend: report arguments errors with better detail When reporting argument errors, show also a context -- what is processed, what is the name of the command. --- ipalib/frontend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipalib/frontend.py') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index cac3e3b39..f478ef098 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -869,7 +869,8 @@ class Command(HasParam): for arg in args(): if optional and arg.required: raise ValueError( - '%s: required argument after optional' % arg.name + '%s: required argument after optional in %s arguments %s' % (arg.name, + self.name, map(lambda x: x.param_spec, args())) ) if multivalue: raise ValueError( -- cgit