[[[
Spew out a customized Exception when the test is provided with an
invalid argument.
* subversion/tests/cmdline/svntest/main.py
(run_tests): Catch ValueError Exception and throw back
a customised Exception that makes more sense to the user.
]]]
Index: svntest/main.py
===================================================================
--- svntest/main.py (revision 19800)
+++ svntest/main.py (working copy)
@@ -808,7 +808,13 @@
elif arg.startswith('BASE_URL='):
test_area_url = arg[9:]
else:
- testnums.append(int(arg))
+ try:
+ testnums.append(int(arg))
+ except ValueError:
+ err_str = "Invalid argument :%s.\n" % arg
+ err_str += "Valid arguments are: "
+ err_str += "`list' and/or a valid test number."
+ raise Exception(err_str)
for opt, val in opts:
if opt == "--url":
Spew out a customized Exception when the test is provided with an
invalid argument.
* subversion/tests/cmdline/svntest/main.py
(run_tests): Catch ValueError Exception and throw back
a customised Exception that makes more sense to the user.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 24 10:38:06 2006