From 1c6f303c7069dc5d043b5415a4d069e1074e8493 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Fri, 4 May 2007 21:51:15 +0000 Subject: [PATCH] add debugging hint to cmdln.py --- osc/cmdln.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osc/cmdln.py b/osc/cmdln.py index 0ce40e17..f7fc6580 100644 --- a/osc/cmdln.py +++ b/osc/cmdln.py @@ -1123,6 +1123,13 @@ class Cmdln(RawCmdln): msg[2] = msg[2].replace("arguments", "argument") msg[3] = int(msg[3]) - 3 msg = ''.join(map(str, msg)) + + # To debug errors which involve calling functions with + # wrong number of arguments, uncomment the following line. + # Otherwise, all errors of this kind are presented as + # "incorrect usage" to the user: + #raise + raise CmdlnUserError(msg) else: raise